Skip to content

Highlight pack — minimal example

A near-empty starter for building your own highlight pack. Rename id and name to something unique (alphanumeric / hyphen / underscore only) and add rules. Import via Settings → Syntax Highlighting → Import pack…, or drop the file directly into $SUPPORT_DIR/highlight/<id>.json.

The schema is documented in Advanced → Syntax highlighting. Use the rule playground to test patterns against real captures before saving.

Download

Download highlight-pack.example.json

Or copy from the block below — Material's copy-button is in the top-right of the code block.

Pack contents

{
  "id": "my-lab",
  "name": "My Lab",
  "description": "Example highlight pack for personal / lab use. Rename `id` and `name`, then import via Settings → Syntax Highlighting → Import pack… The `id` becomes the pack's filename under $SUPPORT_DIR/highlight/<id>.json and must be alphanumeric, hyphen, or underscore.",
  "rules": [
    {
      "pattern": "\\blab-[a-z0-9-]+\\b",
      "color": "magenta",
      "group": "lab-hostnames"
    },
    {
      "pattern": "\\b(?:PASS|OK|SUCCESS)\\b",
      "color": "green",
      "ignoreCase": false,
      "group": "test-ok"
    },
    {
      "pattern": "\\b(?:FAIL|ERROR|ABORT)\\b",
      "color": "red",
      "ignoreCase": false,
      "group": "test-fail"
    },
    {
      "pattern": "\\bTODO\\b",
      "color": "yellow",
      "ignoreCase": false,
      "group": "todo"
    }
  ]
}