Visual Studio 代码:主题一 Monokai:C/C++ `const` 的更改/自定义突出显示颜色
Visual Studio Code: Theme One Monokai: Change / Custom Highlight Color for C/C++ `const`
我正在使用(惊人的)One Monokai theme in visual studio code. One thing that bothers me is that variable modifers like const
and control flow like for
, if
, while
, ... are displayed using the same color. Based on this tutorial,我尝试通过添加到 settigs.json
:
来自定义颜色
"editor.semanticTokenColorCustomizations": {
"[One Monokai]": {
"rules": {
"<KEYWORD>": {
"foreground": "#A2142F"
}
}
}
}
我尝试了多个 <KEYWORDS>
列出的 here,我希望 readonly
或 property
可以工作。我尝试了一个不同的、明确的关键字,例如variable
- 按预期工作,所以一般“框架”正在工作。
知道必须使用什么关键字吗?或者我是否必须使用第三方包来解决特定单词的突出显示问题?
评论将我推向了正确的方向 this tutorial,工作代码是
"editor.tokenColorCustomizations": {
"[One Monokai]": {
"textMateRules": [
{
"scope": "storage.modifier.specifier.const.cpp",
"settings": {
"foreground": "#A2142F"
}
}
]
}
}
我正在使用(惊人的)One Monokai theme in visual studio code. One thing that bothers me is that variable modifers like const
and control flow like for
, if
, while
, ... are displayed using the same color. Based on this tutorial,我尝试通过添加到 settigs.json
:
"editor.semanticTokenColorCustomizations": {
"[One Monokai]": {
"rules": {
"<KEYWORD>": {
"foreground": "#A2142F"
}
}
}
}
我尝试了多个 <KEYWORDS>
列出的 here,我希望 readonly
或 property
可以工作。我尝试了一个不同的、明确的关键字,例如variable
- 按预期工作,所以一般“框架”正在工作。
知道必须使用什么关键字吗?或者我是否必须使用第三方包来解决特定单词的突出显示问题?
评论将我推向了正确的方向 this tutorial,工作代码是
"editor.tokenColorCustomizations": {
"[One Monokai]": {
"textMateRules": [
{
"scope": "storage.modifier.specifier.const.cpp",
"settings": {
"foreground": "#A2142F"
}
}
]
}
}