-
-
Notifications
You must be signed in to change notification settings - Fork 349
Description
Describe the bug
vscode pop up
Request textDocument/documentSymbol failed.
comes up on every keystroke.
To Reproduce
https://github.com/kdiffin/test-templ
I dont think the reproduction will help though, pretty sure its a setup issue, havent been able to fix it using the troubleshooting guide though.
Expected behavior
for this error not to occur, it doesn't occur on my windows device.
Screenshots
2025-06-03_20-28-31.mp4
Logs
gopls.log latest logs:
Result: [{"name":"HomePage","detail":"func(name string) templ.Component","kind":12,"range":{"start":{"line":9,"character":0},"end":{"line":66,"character":1}},"selectionRange":{"start":{"line":9,"character":5},"end":{"line":9,"character":13}}}]
templ.log latest logs:
{"time":"2025-06-03T21:07:46.604137377+04:00","level":"INFO","msg":"client -> server: CodeLens"}
{"time":"2025-06-03T21:07:46.604711756+04:00","level":"INFO","msg":"client -> server: CodeLens end"}
{"time":"2025-06-03T21:07:46.620273904+04:00","level":"INFO","msg":"client -> server: DocumentSymbol"}
{"time":"2025-06-03T21:07:46.621387302+04:00","level":"ERROR","msg":"selection range not within range","symbol":{"name":"HomePage","detail":"func(name string) templ.Component","kind":12,"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":0}},"selectionRange":{"start":{"line":2,"character":6},"end":{"line":2,"character":14}}}}
{"time":"2025-06-03T21:07:46.621452822+04:00","level":"INFO","msg":"client -> server: DocumentSymbol end"}
{"time":"2025-06-03T21:07:47.5290634+04:00","level":"INFO","msg":"client -> server: Hover"}
{"time":"2025-06-03T21:07:47.52917629+04:00","level":"INFO","msg":"updatePosition: not found","uri":"file:///home/kdiffin/real-deal/programming/web-dev/test-templ/web/components/home.templ","from":"7:2"}
templ info output
$ templ info
(✓) os [ goos=linux goarch=amd64 ]
(✓) go [ location=/usr/local/go/bin/go version=go version go1.24.3 linux/amd64 ]
(✓) gopls [ location=/home/kdiffin/go/bin/gopls version=golang.org/x/tools/gopls v0.18.1 ]
(✓) templ [ location=/home/kdiffin/go/bin/templ version=v0.3.887 ]
kdiffin@kdiffin:~/real-deal/programming/web-dev/diffin-media$
Desktop (please complete the following information):
- OS: Linux, KDE Neon
- templ v0.3.887
- Go version go1.24.3
goplsversion v0.18.1