2

I was looking here and I'm getting stumped on how to change the color of classes in VSCode. Currently, it looks like this:

from pathlib import Path

... But I'm trying to change the color of classes and haven't been successful so far. So far, I've tried this:

{
    "python.pythonPath": "/usr/local/bin/python3",
    "python.languageServer": "Pylance",
    "python.showStartPage": false,
    "workbench.colorCustomizations": {},
    "editor.tokenColorCustomizations": {
        "textMateRules": [
            {
                "scope": "entity.name.class",
                "settings": {
                    "foreground": "#FF0000"
                }
            }
        ]
    }
}

Not sure what the value of scope should be to get this to work.

1
  • when you customize colors name the appropriate Theme, Now you do it for all themes, light and dark Commented Feb 23, 2021 at 4:27

1 Answer 1

4

You can use Inspect editor tokens and scopes to get token name (look at the semantic token type)

enter image description here

Once you know token type set it in the settings

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.