visual-studio-codecomments

Comment colour change not taking effect


I found a VSCode theme I really like but the comment colour was too dark. I changed the colour value in settings.json, however it doesn't work. I have done this before with other themes and it has worked, so I'm not sure what's difference in this case.

When I inspect editor and tokens it shows the change but it's shown with a strikethrough:

showing inspect editor

showing custom comment styling

I have restarted VSCode several times and tried disabling and enabling the theme. When I switch to another theme and switch back it shows the new colour for a split second but then reverts back.


Solution

  • Try setting "editor.semanticHighlighting.enabled": false. If that fixes it, then the theme is using semantic tokens, which by default override textmate rules.