如何在vscode中更改javascript注释的文本颜色

问题描述 投票:0回答:2

如何在 Visual Studio Code 编辑器中更改 javascript 注释的颜色? 默认颜色在我眼中不太明显 我使用主题颜色(Dark Visual Studio) 评论是我只想更改的文本如何?

如您所见,默认颜色不希望您看到它,它隐藏了单词

javascript visual-studio-code comments
2个回答
0
投票

我在 youtube toturial 和 microsoft 文档中研究了几个月后找到了答案,这是值得的,但它的代码非常复杂

打开设置.json

然后将这段代码放入

"editor.tokenColorCustomizations": {
        "textMateRules": [{
            "scope": [
                "comment.line.double-slash.js",
            ],
               "settings" :
                { "foreground": "#5d8025" }
            }
        ]
    }
}

应该是这样的


0
投票

第1步: Ctrl + Shift + P 第2步: 搜索settings.json(用户) 步骤3: 将以下代码粘贴到逗号后-

"editor.tokenColorCustomizations": {
    "textMateRules": [{
        "scope": [
            "comment.line.double-slash.js",
        ],
           "settings" :
            { "foreground": "#5d8025" }
        }
    ]
}

第四步: 根据您的选择更改前景色!

© www.soinside.com 2019 - 2024. All rights reserved.