谢谢你的帮助。如何在 VSCode 中将所有 HTML 属性(即单词 type=)设为斜体?是否可以?我的意思是想改变主题。您知道某些主题如何具有斜体属性吗?type=, class=, id=, 我只是想让这些家伙在主题中用斜体表示。
VS Code 的语法颜色主题fontStyle除了语法范围的颜色外,还可以指定一个。要使文本斜体,您需要设置"fontStyle": "italic"
此示例editor.tokenColorCustomizations设置用于fontStyle将某些 html 属性设为斜体:
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "entity.other.attribute-name",
"settings": {
"fontStyle": "italic"
}
}
]
}
Run Code Online (Sandbox Code Playgroud)
entity.other.attribute-name只是一个示例范围。您可能需要根据您的特定需求调整范围或设置多个范围的样式