I want to change the color of this keyword in python:
global
but I don’t know how to change it in my settings.json file.
Here is my the tokenColorCustomizations part of my vscode settings.json file:
{
"editor.tokenColorCustomizations": {
"comments": "#00af0c",
"strings": "#c7884a",
"variables": "#91e2ff",
"functions": "#fff07a",
"keywords": "#d981ff",
"types": "#ff73d3",
"numbers": "#beffac",
"textMateRules": [
{
"scope": "keyword.operator",
"settings": {
"foreground": "#786831"
}
},
{
"scope": [
"source.python",
"punctuation.definition.variable.python"
],
"settings": {
"foreground": "#ffcaca"
}
}
]
}
}
Can someone please help me? ChatGPT was no help at all. I also already tried some other scopes, but they did not work.
2
Answers
What about these:
You want the TextMate scope
storage.modifier.declaration.python
. Ex.Next time use the scope inspector by running
Developer: Inspect Editor Tokens and Scopes
in the command palette. See also the official syntax highlighting docs and VS Code’s builtin Python TextMate grammar.