Monstar
Monstar

Reputation: 1018

VSCode textmate scopes not overriding color theme when there are multiple scopes

I have installed a custom color theme extension for VSCode and i've been able to override some of the colors from my settings.json, however whenever the theme uses more than one scope, overriding doesn't work on those.

Is there a way to override this color ?

enter image description here

"editor.tokenColorCustomizations": {
        "[Firefox Devtools Italic]": {
            "textMateRules": [
                { // This works:
                    "scope": ["keyword.control"],
                    "settings": {"foreground": "#FF97E9"}
                },
                { // This doesn't work:
                  "scope": [
                        "meta.function-call.js",
                        "entity.name.function.js"
                    ],
                    "settings": {"foreground": "#B98EFF"}
                },
                { // This doesn't work either:
                    "scope": "meta.function-call.js,entity.name.function.js",
                    "settings": {"foreground": "#B98EFF"}
                },
            ]
        }
}

Upvotes: 5

Views: 3434

Answers (1)

Monstar
Monstar

Reputation: 1018

It seems that we have to include the space in the array string for it to work as per the following code:

{
    "scope": ["meta.function-call.js entity.name.function.js"],
    "settings": {"foreground": "#B98EFF"}
},

Upvotes: 6

Related Questions