A Zed extension providing rudimentary (includes syntax highlighting) support for Go templates (text/template and html/template).
This extension provides comprehensive syntax highlighting for Go templates, including:
- Keywords:
define,block,if,else,end,range,template,with - Variables: identifiers and field access (
.Name,.User.Email) - Function calls:
printf,len,index, etc. - Operators:
:= - Literals: strings (interpreted and raw), numbers, booleans, runes
- Special punctuation:
{{,}},{{-,-}} - Comments:
{{/* ... */}} - Built-in constants:
nil,true,false
For a comprehensive example showcasing all syntax highlighting features, see:
examples/highlights-demo.gotmpl- concise demonstrationexamples/comprehensive.gotmpl- detailed showcase
Clone the repository and install as a "dev" extension.
For bug reports or feature requests, please open an issue on the GitHub repository.
- ArcherHume/jinja2-support for Zed extension development clues.
- ngalaiko/tree-sitter-go-template for the necessary Tree-sitter grammar.
- Add language server support


