Skip to content

Latest commit

 

History

History
44 lines (27 loc) · 1.6 KB

File metadata and controls

44 lines (27 loc) · 1.6 KB

Zed Extension for Go Templates

A Zed extension providing rudimentary (includes syntax highlighting) support for Go templates (text/template and html/template).

Syntax Highlighting

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:

Installation

Clone the repository and install as a "dev" extension.

Contributions

For bug reports or feature requests, please open an issue on the GitHub repository.

Credits

To-dos

  • Add language server support