skip to Main Content

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

2

Answers


  1. The problem was found by essentially doing an extension bisect to by caused by altehex.m68k-mot-syntax. I suppose if you really needed it, you could at least only enable it for workspaces where you need it.

    Login or Signup to reply.
  2. 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:

    • in the extension folder create a folder with the name: my-m68k-mot-syntax
    • copy all files from the extension repo (using a zip file) to the my-m68k-mot-syntax folder
    • edit package.json:
      • change the version number to: "version": "1.1.0"
      • remove the scope keyword.operator
      • remove the scope comment.line
      • Or remove all of editor.tokenColorCustomizations, you can do this in settings.json for each theme separate
    • no need for a 2048×2048 icon file (170kb), scale the png image to 256×256

    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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search