I can’t change the color of the module name in VS Code, Python code, the following setting.json code does not work, can you give me some tips to teach me how to change the color of the module name?
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "entity.name.module.python",
"settings": {
"foreground": "#008000"
}
}
]
}
For example, my goal is to change the color of the "random" in "import random"
2
Answers
You could use the
module
semantic token type. Like so:This will apply to all
module
semantic tokens in any language.Or you could use the
entity.name.namespace
TextMate token scope. Like so:This will apply to all
entity.name.namespace
TextMate tokens scopes in any language.