VS Code禁用JSDoc注释着色

问题描述 投票:3回答:1

我想在Visual Studio Code中禁用多色JSDoc注释。

目前,JSDoc注释看起来像这样(@param等颜色不是默认注释颜色):

enter image description here

我希望整个评论是相同的默认灰色。我尝试禁用所有扩展和自定义用户设置,但这不会影响JSDoc突出显示。有谁知道我需要更改哪些设置来修复此问题?我认为workbench.colorCustomizationseditor.tokenColorCustomizations会有我想要改变的设置,但我一直无法找到它。

visual-studio-code vscode-settings
1个回答
4
投票

感谢One Dark Pro GitHub上的用户Binaryify,向我展示了改变VS Code中JSDoc突出显示的设置! Link to the GitHub issue

"editor.tokenColorCustomizations": {
    "textMateRules": [
      {
        "name": "storage.type.class.jsdoc",
        "scope":
          "storage.type.class.jsdoc,entity.name.type.instance.jsdoc,variable.other.jsdoc",
        "settings": {
          "foreground": "#7f848eff"
        }
      }
    ]
  },

将“前景”颜色替换为您用于注释的颜色。此处使用的颜色是One Dark Pro主题中使用的默认灰色。

© www.soinside.com 2019 - 2024. All rights reserved.