有没有办法在 VS Code 中自定义 JS 中导入的颜色? [英] Is there a way to customize the color of the import in JS in VS Code?
问题描述
我正在尝试在 VS Code 中更改 JS 中 import
后单词的颜色.我附上了我的意思的截图.
截图:
我所指的是红色下划线
我在
您将在底部看到 textmate scopes
的适用范围条目,您可以使用列出的任何选项,但最上面的选项是最具体的选项
I'm trying to change the color of the word after import
in JS, in VS Code. I attached a screenshot of what I mean.
Screenshot:
What I'm referring to is underlined in red
I didn't find a valid entry in the textMateRules for this.
I'd appreciate some help. Thanks :)
I don't know which flavor of javascript you are using but you can use the following in your settings.json
:
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "variable.other.readwrite.alias.js",
"settings": {
"foreground": "#FF0000"
}
}
]
}
How to know which scopes a given token has
In your command palette type:
> Developer: Inspect Editor Tokens and Scopes
This will show a popup of information related to the token at cursor:
You will see applicable scope entries at the bottom for textmate scopes
, you can use any of the options listed, but the topmost option is the most specfic option
这篇关于有没有办法在 VS Code 中自定义 JS 中导入的颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!