VS Code 禁用 JSDoc 注释着色 [英] VS Code Disable JSDoc Comment Coloring

查看:37
本文介绍了VS Code 禁用 JSDoc 注释着色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 Visual Studio Code 中禁用彩色 JSDoc 注释.

I want to disable multicolored JSDoc comments in Visual Studio Code.

目前,JSDoc 的注释看起来像这样(@param 等被涂上了默认注释颜色以外的颜色):

Currently, the JSDoc comments look like this (@param, etc. is colored something other than the default comment color):

我希望整个评论都是相同的默认灰色.我尝试禁用所有扩展和自定义用户设置,但这并没有影响 JSDoc 突出显示.有谁知道我需要更改哪些设置来解决这个问题?我以为 workbench.colorCustomizationseditor.tokenColorCustomizations 都会有我想更改的设置,但我找不到.

I want the entire comment to be the same default grey color. I tried disabling all extensions and custom user settings, but that didn't affect the JSDoc highlighting. Does anyone know what settings I need to change to fix this? I thought either workbench.colorCustomizations or editor.tokenColorCustomizations would have the setting I want to change, but I haven't been able to find it.

推荐答案

感谢 One Dark Pro GitHub 上的用户 Binaryify 向我展示了更改 VS Code 中 JSDoc 突出显示的设置!GitHub 问题链接

Thanks to user Binaryify on the One Dark Pro GitHub for showing me the settings that change the JSDoc highlighting in VS Code! 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 主题中使用的默认灰色.

Replace the "foreground" color with the color you are using for comments. The color used here is the default gray used in the One Dark Pro theme.

这篇关于VS Code 禁用 JSDoc 注释着色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆