visual-studio-codethemeslightmode

VS Code light themes making symbols invisible


VS Code 1.94.2 on macOS Sequoia 15.0.1

I usually don't mess around with themes much other than trying out different coding fonts. I've been using dark themes for months but just felt like using a light theme. I found that with all the light themes the colour for many symbols, punctuation, operators is the same as the background colour, or close enough that I can't see them:

Light (Visual Studio) Visual Studio Light:
Visual Studio Light

Solarized Light:
Solarized Light

With text selected they're not as bad:

Visual Studio Light with selection Solarized Light with selection

Dark themes are fine: Visual Studio Dark Solarized Dark

As I say I don't usually mess with the theme so I don't think I've manually changed the colour settings. Nobody else uses my laptop. The only theme-related extension I have installed is Peacock so I tried disabling it but that made no difference.

I've looked through the settings to no avail and Googling doesn't seem to bring up other people with this problem.

This is what I see if I use "Inspect Editor Tokens and Scopes": TextMate Scopes


Solution

  • The problem extension was found by enabling the extensions 1 by 1.

    It was altehex.m68k-mot-syntax.

    The package.json file of the extension contains a section:

          "editor.tokenColorCustomizations": {
            "textMateRules": [
              {
                "scope": "comment.line",
                "settings": {
                  "fontStyle": "italic"
                }
              },
              {
                "scope": "keyword.operator",
                "settings": {
                  "foreground": "#FFFFFF",
                  "fontStyle": "italic bold"
                }
              }
            ]
          }
    

    and a few other scopes.

    The line "foreground": "#FFFFFF" forces all keyword.operator scopes to be white in all themes. It should be removed.

    Also the forcing of all comment.line to be italic is wrong, the theme controls that, and also should be removed.


    If this extension is still useful for you do the following:

    You can use the TextMate Scope Inspector to find the scope names you want to give a different color in your settings.json. It is the Theme that determines the color not the language syntax.