我正在尝试使Visual代码的主题符合我的要求。目前,我正在尝试使用使用C#规则的Obsidian,但我不确定要使用哪个关键字来覆盖颜色自定义。VSCode似乎没有识别接口,因为它们是特定于语言的。
"editor.tokenColorCustomizations": {
"functions" :{
"foreground": "#F1F2F3"
},
"interface": { //not valid
"foreground": "#B48C8C"
}
}如何获得VSCode颜色自定义以识别c#特定的语法?
发布于 2020-04-17 10:05:26
"editor.tokenColorCustomizations": {
"[Default Dark+]": { // remove scope to apply to all themes
"textMateRules": [
{
"scope": "entity.name.type.interface.cs",
"settings": {
"foreground": "#b8d7a3"
}
},
{
"scope": "storage.type.interface.cs",
"settings": {
"foreground": "#b8d7a3"
}
}
]
}
},发布于 2019-06-15 16:48:35
我相信,可以通过编辑"Program \Microsoft VS Code\resources\app\extensions\csharp\syntaxes“”,通过使用与约定相匹配的正则表达式添加对"storage.type.interface.cs“的支持来完成部分工作。
有点像[I]([A-Z][a-z][A-Za-z]*)
您还可以排除像IISManager, IPhoneDevice这样的可能的不匹配。
https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide https://www.apeth.com/nonblog/stories/textmatebundle.html
祝你好运,如果你完成了,请告诉我。
https://stackoverflow.com/questions/47272835
复制相似问题