Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable italics on strings #18

Open
Bosphoramus opened this issue Nov 10, 2020 · 3 comments
Open

Disable italics on strings #18

Bosphoramus opened this issue Nov 10, 2020 · 3 comments

Comments

@Bosphoramus
Copy link

Bosphoramus commented Nov 10, 2020

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
Copy link
Author

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

@robertrossmann
Copy link
Owner

robertrossmann commented Jan 21, 2021

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

@Bosphoramus
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants