Visual studio code 在VS代码中分别更改注释和块注释颜色
我试图找出如何为单行注释指定一种颜色,为块注释指定另一种颜色(多行) 以下用于将所有注释设置为特定颜色:Visual studio code 在VS代码中分别更改注释和块注释颜色,visual-studio-code,vscode-settings,Visual Studio Code,Vscode Settings,我试图找出如何为单行注释指定一种颜色,为块注释指定另一种颜色(多行) 以下用于将所有注释设置为特定颜色: "editor.tokenColorCustomizations": { "comments" :"#ff0022", } 有没有办法单独指定它们?e、 g.“blockComment”:“#00FF00”,“commentLine”:“#FF00222”使用“textMateRules”设置“commen
"editor.tokenColorCustomizations": {
"comments" :"#ff0022",
}
有没有办法单独指定它们?e、 g.“blockComment”:“#00FF00”,“commentLine”:“#FF00222”
使用“textMateRules”
设置“comment.block”
的范围设置,“comment.line”
可以单独设置颜色
"editor.tokenColorCustomizations": {
"textMateRules": [{
"scope": "comment.block",
"settings": {
"foreground": "#0000"
}
},
{
"scope": "comment.line",
"settings": {
"foreground": "#0000FF"
}
}],
}
更改标点符号“标点符号.定义.注释.js”
(js):
如果您的语言服务器为这些注释设置了不同的TextMate作用域,您可以设置不同的colors@rioV8谢谢尝试了
“textMateRules”
,现在可以自定义这两种注释的颜色。将编辑内容作为问题的答案发布,以便将其标记为resolved@rioV8完成。另外,我确实想知道为什么“标点符号.定义.注释”
似乎不正确。查看主题文件:使用数组作为作用域是或的作用域,我认为如果你想要和的作用域,你必须使用类似“scope1 scope2”
"editor.tokenColorCustomizations": {
"textMateRules": [{
"scope": "comment.line, punctuation.definition.comment.js",
"settings": {
"foreground": "#00FF00"
}
}]
}