Syntax highlighting, block validation, bracket matching, code folding, and Outline navigation for Go template ({{ }}) and Liquid template ({% %}) expressions inside YAML files.
Built for YAML files that embed template logic — Helm charts, Jekyll configs, Shopify themes, and any YAML with Go/Liquid templating.
Screenshots
| Before | After |
|---|---|
![]() |
![]() |
| Bracket Matching & Block Highlighting |
|---|
![]() |
Features
Syntax Highlighting
- Go template —
{{ .Name }},{{- if ... }},{{ range }},{{ end }},{{ toYaml }} - Liquid template —
{% for %},{% assign %},{% if %},{% endif %},{% raw %},{% endraw %} - YAML in block scalars — keys, values, booleans, numbers, strings, and list items inside
|multi-line blocks
Block Validation (Linter)
Detects unclosed or mismatched template blocks and reports them as warnings in the Problems panel:
- Unclosed
{%- if %}— missing{%- endif %} - Unexpected
{{ end }}— no matching opening block - Covers all pairs:
if/endif,for/endfor,raw/endraw,comment/endcomment,capture/endcapture,unless/endunless,case/endcase,tablerow/endtablerow,block/endblock - Go templates:
if,range,with,define,block→end
Bracket Matching
Click on any template open/close tag and the matching pair gets highlighted:
{%- if ... %}↔{%- endif %}{{ range ... }}↔{{ end }}- Works for all Go and Liquid block pairs
Code Folding
Collapse template blocks to focus on the logic that matters:
- Fold
{%- if %}...{%- endif %}blocks - Fold
{{ range }}...{{ end }}blocks - Works for all nested block pairs
Outline Navigation
Key sections appear in the Outline panel (sidebar) for quick navigation in large YAML files.
What Gets Highlighted
Go Templates ({{ }})
| Element | Example |
|---|---|
| Delimiters | {{ }}, {{- -}} |
| Keywords | if, else, end, range, with, define, template |
| Functions | toYaml, indent, quote, default, nindent, printf |
| Variables | $name, $flag, $value |
| Dot accessors | .Name, .ApplicationSpec.StackSpec.repo.url |
| Operators | :=, ` |
| Strings | "hello" |
| Booleans | true, false |
Liquid Templates ({% %})
| Element | Example |
|---|---|
| Delimiters | {% %}, {%- -%} |
| Keywords | for, endfor, if, elsif, endif, assign, capture, comment, raw, endraw, unless, case, tablerow, break, continue |
| Filters | append, base64_decode, default, replace, split, strip, and 30+ more |
| Operators | ==, !=, and, or, contains, ` |
| Variables | item.name, settings.api.host |
Use Cases
- Helm charts — YAML with Go template directives
- Infrastructure-as-code templates — mixed Go + Liquid templates in YAML
- Jekyll / Shopify configs — YAML with Liquid expressions
- Any YAML with embedded
{{ }}or{% %}template syntax
Installation
Search "GoLiquid YAML" in the VS Code / Cursor extensions sidebar, or:
code --install-extension ajinzrathod.goliquid-yaml
How It Works
- Syntax highlighting: TextMate grammar injection (
injectTo: source.yaml) layers template patterns on top of standard YAML - Validation, folding, bracket matching, outline: TypeScript extension using the VS Code API — activated on any YAML file
License
MIT


