Is there a way to Bold all tags in VS Code?

Viewed 202

Is there a way in settings to bold all tags in VS Code.

EX to turn:

```<ul>
  <li class="clickable">Clickable</li>
  <li>Not clickable</li>
<ul>```

To this:

```**<ul>
  <li** class="clickable">Clickable**</li>**
  **<li>**Not clickable**</li>
<ul>**```
1 Answers

I think this is what you want in your settings.json:

"editor.tokenColorCustomizations": {
    "textMateRules": [
      {
        "scope": "punctuation.definition.tag, entity.name.tag.html",
        "settings": {
          // "foreground": "#ff0000",
          "fontStyle": "bold"
        }
      },
    ]
  },

You may or may not want the punctuation.definition.tag selector.

See https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide#scope-inspector for how to find the scope of tokens in your language. And https://code.visualstudio.com/docs/getstarted/themes#_customizing-a-color-theme for using the editor.tokenColorCustomizations setting to modify those language scopes you found in step one.

Related