Visual studio code VSCode-如何仅在javascript文件中更改常量的颜色?
由于最近对vscode进行了更新,我一辈子都找不到将其还原为旧颜色的设置。看起来所有的常量都变成了绿色,而规则变量保持不变。谢谢Visual studio code VSCode-如何仅在javascript文件中更改常量的颜色?,visual-studio-code,Visual Studio Code,由于最近对vscode进行了更新,我一辈子都找不到将其还原为旧颜色的设置。看起来所有的常量都变成了绿色,而规则变量保持不变。谢谢 将此添加到主题的settings.json中: "editor.semanticTokenColorCustomizations": { "enabled": true, // enable semantic highlighting for all themes "rules": { "*.readonly": { "foregrou
将此添加到主题的settings.json中:
"editor.semanticTokenColorCustomizations": {
"enabled": true, // enable semantic highlighting for all themes
"rules": {
"*.readonly": { "foreground": "#9cdcfe" },
"*.declaration": { "foreground": "#9cdcfe" }
}
}
不确定如何仅对.js文件执行此操作,但此设置仅更改常量,而不是所有声明。将其粘贴到VsCode settings.json中
禁用语义突出显示设置。它在哪里?我在主题设置中找到的唯一内容是:editor.semanticHighlighting.enabled:false,editor.semanticTokenColorCustomizations:{enabled:false,//为所有主题启用语义高亮显示规则:{*.declaration:{前台:9cdcfe}}}这两个问题都没有解决。我想如果你找到了它,你应该发布一个答案来帮助其他人。这也会改变函数声明的颜色。让我退出2秒钟。
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "variable.other.constant",
"settings": {
"foreground": "#f5f5f5"
}
}
]
},