问题描述
如何在 Visual Studio Code 中自定义诸如 class=""、href=""、src=""、style="" 等 HTML 属性的颜色?
解决方法
打开 settings.json
文件并添加:
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope":"entity.other.attribute-name","settings": {
"foreground": "#ca9829","fontStyle": "italic"
}
}
]
}
您也可以将主题设置为仅适用于该主题,而不适用于全局。 Here 是这一切的诀窍。