答案 0 :(得分:2)
在settings.json中尝试此设置:
"editor.tokenColorCustomizations": {
"variables": "#f00"
},
有一些可用的简单标记颜色自定义:变量,注释,关键字,函数,数字,字符串和类型。那些只允许设置颜色。
如果使用“textMateRules”,则可以设置更多属性。例如:
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "comment",
"settings": {
"fontStyle": "italic",
"foreground": "#C69650"
}
}
]
},
答案 1 :(得分:2)
这对我有用。据我所知,它看起来像默认的Javascript格式。
在settings.json
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "meta.function-call.generic.python",
"settings": {
"foreground": "#DCDCAA"
}
},
{
"scope": "source.python",
"settings": {
"foreground": "#9CDCFE"
}
},
{
"scope": "punctuation.definition.string.begin",
"settings": {
"foreground": "#ce9178"
}
},
{
"scope": "punctuation.definition.string.end",
"settings": {
"foreground": "#ce9178"
}
},
{
"scope": "punctuation",
"settings": {
"foreground": "#dfdfdf"
}
}
]
}
答案 2 :(得分:0)
您应该能够在tokenColors
中添加颜色以自定义颜色(基本示例):
<强> SomeTheme.json 强>
{
"name": "Some Theme",
"type": "dark",
"colors": {
...
},
"tokenColors": [
{
"name": "Variables",
"scope": "variable",
"settings": {
"foreground": "#e06c75"
}
},
]
}
我没有VSCode
,但从another themes JSON来看,它看起来很相似。