我想自定义当前的配色方案,并将专用的颜色和字体样式斜体应用于Python装饰器。我通过编辑 settings.json 找到了如何进行评论(请参见下面的示例)。请问装饰器的正确关键字是什么?
"editor.tokenColorCustomizations": {
"comments": "#b249ee",
},
提前致谢!
"editor.tokenColorCustomizations": {
"[Monokai]": { // remove this wrapper to apply regardless of colour theme
"textMateRules": [{
"scope": "punctuation.definition.decorator.python", // for the decorator name. only applies when semantic highlighting from the Python extension is not in effect.
"settings": {
"foreground": "#FF0000",
// "fontStyle": "bold"
}
},{
"scope": "meta.function.decorator.python support.type.python", // for the "@" sign
"settings": {
"foreground": "#FF0000",
// "fontStyle": "bold"
}
}],
},
},
"editor.semanticHighlighting.enabled": false,
"editor.semanticTokenColorCustomizations": {
"[Monokai]": { // remove this wrapper to apply regardless of colour theme
"enabled": false,
"rules": {
"class.decorator:python": { // remove ":python" to apply to all languages
"foreground": "#FF0000",
// "fontStyle": "bold",
},
},
}
},