Microsoft/TypeScript

Add semantic token scope for object literal shorthand properties

Open

#52.658 geöffnet am 2. Feb. 2023

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)TypeScript (6.726 Forks)batch import
Experience EnhancementHelp WantedSuggestion

Repository-Metriken

Stars
 (48.455 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 6T 17h) (9 gemergte PRs in 30 T)

Beschreibung

TS Template added by @mjbvz

TypeScript Version: 4.9.5

Search Terms

  • Semantic tokens
  • semantic colorization

I want a way to configure vscode to treat literal property value shorthand as parameter or variable, not just a property key.

image Above is what happend in vscode. I configure a purple color for parameters, but vscode treat literal property value shorthand as "property" key, not "parameter" or "variable". That's bad for me to find out how parameters are processed in a function quickly.

However, webstorm is ok in this case. image

My settings is as follows:

  "editor.tokenColorCustomizations": {
    "[Default Dark+]": {
      "keywords": "#499CD5",
      "textMateRules": [
        { 
          "scope": "variable.parameter",
          "settings": {
            "foreground": "#C288BE"
          }
        },
      ],
    }
  },

Contributor Guide