简体   繁体   English

使用JSDoc时在Visual Studio代码中突出显示注释

[英]Comment highlighting in Visual Studio Code when using JSDoc

In Visual Studio Code, when using JSDoc comments, how can I ensure that the whole comment block is displayed in green (default comment color)? 在Visual Studio Code中,当使用JSDoc注释时,如何确保整个注释块以绿色显示(默认注释颜色)?

As is, mine looks like this: 我的看起来像这样:

在此输入图像描述

But I would like it to look like this: 但我希望它看起来像这样:

在此输入图像描述

If it helps, I have installed the DocumentThis extension, which is where the second screenshot is from. 如果有帮助,我已经安装了DocumentThis扩展,这是第二个屏幕截图所在的位置。

From an older post 来自一篇较旧的帖子

Add this to your Settings (File -> Preferences -> Settings) 将其添加到您的设置(文件 - >首选项 - >设置)

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

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

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