Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change VisualStudioCode comment color with it's slashes?

Tags:

I added this code to my setting.json

"editor.tokenColorCustomizations": {
    "comments": "#00ff00"
}

But It doesn't change the color for slashes as you can see the below screenshot.
It remains still grayed.

How can I change the whole comment color contains slashes?

enter image description here

like image 611
AutumnSky Avatar asked Dec 11 '18 16:12

AutumnSky


People also ask

How do I change the color of text in Visual Studio?

On the menu bar, choose Tools > Options. In the options list, choose Environment > Fonts and Colors. In the Show settings for list, choose Environment. If you want to change the font for tool windows only, in the Show settings for list, choose All Text Tool Windows.


1 Answers

The comments definition (// or # for other languages) can be customized with the punctuation.definition.comment scope in the textMateRules array.

Example:

"editor.tokenColorCustomizations": {
  "[Material Theme Darker High Contrast]": { // optional name of a specific theme
    "textMateRules": [
      {
        "scope": "punctuation.definition.comment",
        "settings": {
          "foreground": "#00ff00"
        }
      }
    ]
  }
}

You can see the scopes of all the command Inspect TM Scopes in the command palette.

like image 57
fabio.sang Avatar answered Nov 15 '22 07:11

fabio.sang