Skip to content
This repository was archived by the owner on Jul 10, 2026. It is now read-only.

Commit 39d1472

Browse files
committed
fix tree-sitter query errors and update readme
Fixed invalid node types in highlights.scm that prevented the language from loading in Zed. The 'break' and 'continue' keywords don't exist in the ngalaiko/tree-sitter-go-template grammar. Also updated README with: - Correct GitHub URLs (STR-Consulting/gozer) - Zed settings configuration instructions for file associations
1 parent b79c821 commit 39d1472

6 files changed

Lines changed: 57 additions & 7 deletions

File tree

.beans/.sync.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
"synced_at": "2026-01-18T16:27:04.523366Z"
88
}
99
},
10+
"gozer-9n0f": {
11+
"clickup": {
12+
"task_id": "868h4jxx6",
13+
"synced_at": "2026-01-18T18:42:27.361685Z"
14+
}
15+
},
1016
"gozer-iynv": {
1117
"clickup": {
1218
"task_id": "868h4jx7w",
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
# gozer-3ce4
3+
title: Fix invalid tree-sitter query nodes in highlights.scm
4+
status: completed
5+
type: bug
6+
created_at: 2026-01-18T19:00:55Z
7+
updated_at: 2026-01-18T19:00:55Z
8+
---
9+
10+
The highlights.scm files referenced 'break' and 'continue' node types that don't exist in the ngalaiko/tree-sitter-go-template grammar, causing Zed to fail loading the Go HTML Template language with error:
11+
12+
```
13+
Query error at 27:2. Invalid node type "break"
14+
```
15+
16+
Removed the invalid node type references from both gotmpl and gohtml highlights.scm files.

README.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,44 @@ The extension automatically downloads the appropriate LSP binary for your platfo
4242

4343
This loads the extension from your local checkout, useful for testing changes. See [Zed's extension development docs](https://zed.dev/docs/extensions/developing-extensions#developing-an-extension-locally) for more details.
4444

45+
**Zed Settings Configuration:**
46+
47+
After installing the extension, you can customize file associations in your Zed `settings.json` (Cmd+, → "Open Settings"):
48+
49+
```json
50+
{
51+
"languages": {
52+
"Go HTML Template": {
53+
"language_servers": ["go-template-lsp"]
54+
},
55+
"Go Text Template": {
56+
"language_servers": ["go-template-lsp"]
57+
}
58+
}
59+
}
60+
```
61+
62+
The language names "Go Text Template" and "Go HTML Template" are registered by this extension. They automatically apply to these file extensions:
63+
64+
- **Go Text Template**: `.gotmpl`, `.go.tmpl`, `.gtpl`, `.tpl`
65+
- **Go HTML Template**: `.gohtml`, `.go.html`, `.html.tmpl`
66+
67+
To add additional file extensions, use `file_types`:
68+
69+
```json
70+
{
71+
"file_types": {
72+
"Go HTML Template": ["tmpl", "html"]
73+
}
74+
}
75+
```
76+
4577
### Standalone LSP Binary
4678

47-
Download prebuilt binaries from [GitHub Releases](https://github.com/pacer/gozer/releases), or build from source:
79+
Download prebuilt binaries from [GitHub Releases](https://github.com/STR-Consulting/gozer/releases), or build from source:
4880

4981
```bash
50-
go install github.com/pacer/gozer/cmd/go-template-lsp@latest
82+
go install github.com/STR-Consulting/gozer/cmd/go-template-lsp@latest
5183
```
5284

5385
### Other Editors

zed-ext/extension.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
id = "go-template-lsp"
22
name = "Go Template LSP"
3-
version = "0.1.2"
3+
version = "0.1.3"
44
schema_version = 1
55
authors = ["Jason Abbott", "Jason Staten", "yayolande", "Nikita Galaiko", "Mahmud Ridwan"]
66
description = "Go template support with LSP (hover, diagnostics, go-to-definition)"

zed-ext/languages/gohtml/highlights.scm

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424

2525
; Keywords
2626
"block" @keyword
27-
"break" @keyword
28-
"continue" @keyword
2927
"define" @keyword
3028
"else" @keyword
3129
"end" @keyword

zed-ext/languages/gotmpl/highlights.scm

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424

2525
; Keywords
2626
"block" @keyword
27-
"break" @keyword
28-
"continue" @keyword
2927
"define" @keyword
3028
"else" @keyword
3129
"end" @keyword

0 commit comments

Comments
 (0)