Hoff
Hoff

Reputation: 39826

How to color certain characters with TextMate rules, for syntax highlighting in vs code

In VS Code, how can I set the color for the curly bracket characters {and } in .ts files?

In my settings.json, I currently have this as a starting point:

"editor.tokenColorCustomizations": {
        "textMateRules": [{
            "scope": "entity.name.class, entity.name.type", 
            "settings": {
                "foreground": "#cc0000",
                "fontStyle": "italic",
             }
        }],
}

Upvotes: 4

Views: 2778

Answers (1)

jabacchetta
jabacchetta

Reputation: 50058

This should be what you're looking for:

"editor.tokenColorCustomizations": {
  "textMateRules": [
    {
      "scope": [
        "punctuation.definition.block.ts"
      ],
      "settings": {
        "foreground": "#ff0000"
      }
    }
  ]
},

Upvotes: 5

Related Questions