我有一个关于VisualStudioCodeOneDark Pro主题的问题。我想更改变量的颜色(只更改我声明的变量,不更改方法调用等),但是当我尝试使用
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "source.python",
"settings": {
"foreground": "#E06C75"
}
}
]
}
我明白了(我写了一个代码示例来说明发生了什么):
正如您所看到的,冒号是红色的,每个变量甚至“for i in…”和完整的“os.system.getcwd()”都是红色的
我只希望我声明的变量是红色的。我怎么做? 提前谢谢你
可以使用
Syntax Highlighting
修改VSCode中的编辑器颜色,如下所示:或者像这样的
Semantic Highlighting
:如果不知道要自定义的对象的范围,可以使用VSCode:
Developer: Inspect Editor Tokens and Scopes
(命令调色板)中的内置工具我认为this article和this one可以帮助您理解VSCode中的颜色定制
相关问题 更多 >
编程相关推荐