'VS Code textMateRules doesn't change the modifier I want

In the following image:

enter image description here

the non italic name, I can change its colours no problem, forget about it. The two italic name are of scopes variable.parameter. The one in the parenthesis is can have a modifier called declaration that can be applied to specifically target it.

"editor.tokenColorCustomizations": {
    "textMateRules": [
      {
        "scope": ["variable.parameter"], // changes both 'name's
        "settings": {
          "fontStyle": "",
          "foreground": "#DDD7C8"
        }
      },
      {
        "scope": ["variable.declaration"], // supposed to change upper one (even tried variable.parameter.declaration and it didn't work)
        "settings": {
          "fontStyle": "italic",
          "foreground": "#D58B39"
        },
      },
}

But the modifier doesn't get applied. Can you help me solve this please? I didn't find an answer in the documentation.



Solution 1:[1]

@rioV8 gave the correct answer !

I should use .semanticTokenColorCustomizations instead of editor.tokenColorCustomizations !

Source: Medium guide. (also suggested by @rioV8)

Thank you for your answer @rioV8 !

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ayoub Ayari