我将此代码添加到我的setting.json中
"editor.tokenColorCustomizations": {
"comments": "#00ff00"
}
但它不会改变斜杠的颜色,因为你可以看到下面的截图。 它仍然是灰色的。
如何更改整个注释颜色包含斜杠?
可以使用punctuation.definition.comment
数组中的textMateRules
范围自定义注释定义(//或其他语言的#)。
例:
"editor.tokenColorCustomizations": {
"[Material Theme Darker High Contrast]": { // optional name of a specific theme
"textMateRules": [
{
"scope": "punctuation.definition.comment",
"settings": {
"foreground": "#00ff00"
}
}
]
}
}
您可以在命令面板中查看所有命令Inspect TM Scopes
的范围。