【问题标题】:How to colorize jsdoc in vscode?如何在 vscode 中为 jsdoc 着色?
【发布时间】:2017-11-22 01:33:41
【问题描述】:

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

【问题讨论】:

    标签: javascript visual-studio-code jsdoc


    【解决方案1】:

    从命令面板执行此命令以查找所需的 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"
                }
            }
        ]
    }
    

    【讨论】:

    猜你喜欢
    • 2020-09-05
    • 1970-01-01
    • 1970-01-01
    • 2022-11-03
    • 2022-11-02
    • 2021-08-04
    • 1970-01-01
    • 1970-01-01
    • 2017-01-06
    相关资源
    最近更新 更多