vscode-remedy icon indicating copy to clipboard operation
vscode-remedy copied to clipboard

Disable italics on strings

Open Bosphoramus opened this issue 5 years ago • 3 comments

I think it would be better to have strings using the normal font style. As an example, in HTML, attributes AND strings are styled in Italic, it makes kind of a weird effect. I suppose it's configured like this by default for a reason, im curious why so this feature request is a question too, thanks

Bosphoramus avatar Nov 10 '20 19:11 Bosphoramus

If anyone wants to force this behaviour, use this configuration in vscode's settings.json, at least thats what i did.

"editor.tokenColorCustomizations": { "textMateRules": [ { "scope": [ "string" ], "settings": { "fontStyle": "" } } ] }

Now HTML looks cleaner:

image

Bosphoramus avatar Nov 10 '20 19:11 Bosphoramus

Hey @Bosphoramus I just noticed this issue! 😱 Sorry! I actually wonder the same, to be honest. 😇 I guess I wanted to visually distinguish the attribute names from the html tags but I am not so certain now. On the other hand, I am also a bit hesitant to just un-italicise the attributes... hmm... I'll need to contemplate on this a bit longer.

In the meantime, if you would like to use the theme without italics there is an option for that - Remedy - Straight, it is available in your VS Code's theme selector. And if you would like to straighten up the attribute names but keep everything else italicised, I think this VS Code Settings snippet will do the trick:

"editor.tokenColorCustomizations": {
    "textMateRules": [
      {
        "name": "Remedy - Straighten up HTML attribute names",
        "scope": [
          // For HTML
          "text.html entity.other.attribute-name",
          // For React and TypeScript React
          "source.js meta.tag.attributes entity.other.attribute-name",
          "source.ts meta.tag.attributes entity.other.attribute-name",
          "source.tsx meta.tag.attributes entity.other.attribute-name"
        ],
        "settings": {
          "fontStyle": ""
        }
      }
    ]
  }

html attribute names straightened up

robertrossmann avatar Jan 21 '21 18:01 robertrossmann

No problem, thank you for taking the time to check it :) Love the italics, so ill stick with it and your snippet, thank you! :D

Bosphoramus avatar Jan 21 '21 18:01 Bosphoramus