簡體   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