简体   繁体   English

如何在vscode中着色jsdoc?

[英]How to colorize jsdoc in vscode?

When I open js file, only @param has color. 当我打开js文件时,只有@param有颜色。 How do you add color to others syntaxs like {object}? 如何为其他语法(例如{object})添加颜色? 在此处输入图片说明

Execute this command from command palette to find TM scope selector needed: 从命令选项板执行以下命令以找到所需的TM作用域选择器:

Developer: Inspect TM Scopes

Put the selector into settings.json Ctrl + , 将选择器放入settings.json Ctrl +

Example: 例:

"editor.tokenColorCustomizations": {
    "textMateRules": [
        {
            "scope": "comment.block.documentation.js entity.name.type.instance.jsdoc",
            "settings": {
                "foreground": "#6f42c1"
            }
        },
        {
            "scope": "comment.block.documentation.js storage.type.class.jsdoc",
            "settings": {
                "foreground": "#d73a49"
            }
        },
        {
            "scope": "comment.block.documentation.js variable.other.jsdoc",
            "settings": {
                "foreground": "#24292e"
            }
        }
    ]
}

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

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