如何在vscode中着色jsdoc?

时间:2017-11-21 16:36:28

标签: javascript visual-studio-code jsdoc

当我打开js文件时,只有@param有颜色。如何为{object}等其他语法添加颜色? enter image description here

1 个答案:

答案 0 :(得分:0)

从命令面板执行此命令以查找所需的TM范围选择器:

Developer: Inspect TM Scopes

将选择器放入 settings.json Ctrl +

示例:

"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"
            }
        }
    ]
}