繁体   English   中英

Angular - 如何在 VS Code 的 html 文件中更改变量的颜色?

[英]Angular - How to change variable's color in html file in VS Code?

以前有人问过问题,但没有答案。

我在 html 和 ts 组件文件中有这个片段:

在此处输入图像描述

在此处输入图像描述

我想要变量: allowNewServerserverCreationStatus为紫色。
我的VS Code插件:Angular Essentials(第9版)

我使用这个VS Code 插件,它为 angular html 模板添加了语法高亮。

为了进一步增强它的颜色,特别是紫色,您必须调整您的主题或编辑器textMateRules设置。

在您的settings.json

"editor.tokenColorCustomizations": {
      "textMateRules": [
        {
          "scope": [
            "expression.angular-interpolation",
            "source.directive.angular"
          ],
          "settings": {
            "foreground": "purple" // or use your desired hex code
          }
        },
      ]
  },

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM