Json 使用TextMaterials更改visual studio代码中特定语言单词的颜色
我想更改VS代码中一些VHDL运算符的颜色,在settings.json中有没有一种简单的方法可以做到这一点Json 使用TextMaterials更改visual studio代码中特定语言单词的颜色,json,visual-studio-code,vhdl,syntax-highlighting,Json,Visual Studio Code,Vhdl,Syntax Highlighting,我想更改VS代码中一些VHDL运算符的颜色,在settings.json中有没有一种简单的方法可以做到这一点 { "window.zoomLevel": 0, "workbench.colorTheme": "Visual Studio Dark", "editor.tokenColorCustomizations": { "[Visual Studio Dark]": { "variables": "#ffae00",
{
"window.zoomLevel": 0,
"workbench.colorTheme": "Visual Studio Dark",
"editor.tokenColorCustomizations": {
"[Visual Studio Dark]": {
"variables": "#ffae00",
"textMateRules": [
{
"scope": "keyword.operator",
"settings": {
"foreground": "#FF0000"
}
},
{
"scope": [
"keyword.reserved.vhdl",
],
"settings": {
"foreground": "#1eff00"
}
}
]
}
}
}
这将生成下一个输出:
例如,我希望能够以绿色将vhdl结构保留字(end、entity、architecture、process、if、then、else)与逻辑运算符(not)分开。
或者转让(试试scope inspector。如果他们有不同的作用域,你很幸运,如果他们有相同的作用域,你不能通过textmate规则来完成。我可以更改不同作用域中单词的颜色,但我想更改为相同作用域中的单词,所以现在我必须搜索如何从作用域中更改单词,因为所有vhdl特定的单词re在相同的“reserved.vhdl”范围内