Previously, I could inspect a token and then add textMateRules
to settings.json in VsCode, but now it doesn't work for some reason, maybe because of some recent vue or vscode updates.
If I inspect the token of the AppHeader
component, it says the textmate scope is entity.name.tag.html
and foreground is source.vue entity.name.tag.html
, but changing the foreground will change all of the tags colors, instead of just vue components:
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": ["entity.name.tag.html"],
"settings": {
"foreground": "#000"
}
},
]
}
For example, changing the foreground for "scope": ["entity.name.tag"]
will change the color of <template>
. But I can't find the right "scope" specifically for vue components.
Looking for a possible solution.
Ctrl+shift+P
>Developer: Inspect Editor Tokens and Scopes and examined the components‘ scopes:Here are the tags:
Here are the kebab-cased tokens:
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": [
"meta.tag.other.unrecognized.html.derivative entity.name.tag.html",
"meta.tag.custom.start.html entity.name.tag.html",
"meta.tag.custom.end.html entity.name.tag.html"
],
"settings": {
"foreground": "#67d692",
"fontStyle": "italic"
}
},
]}
Example of the finished work: