a-h / templ

A language for writing HTML user interfaces in Go.
https://templ.guide/
MIT License
8.04k stars 264 forks source link

VS Code: Request textDocument/codeAction failed. #818

Closed johannes-luebke closed 3 months ago

johannes-luebke commented 3 months ago

This might be a duplicate of #801 , but since that issue is closed and I still experience the problem it might be something different.

The templ extension for VS Code isn't working for me. On pretty much every keystroke inside a .templ file, even just moving the cursor I get a popup saying: Request textDocument/codeAction failed.

I get highlighting, and I do get Information about functions and structs when I hover over them. But I don't get any IntelliSense/autocomplete suggestions. And again the error message keeps blinking multiple times a second.

I can give you a minimal repo if you need it, but its really just a basic go mod and a .templ file. I'm adding all the versions and logs I could gather. Let me know if you need anything else.

Thank you!

Go: go version go1.22.1 darwin/arm64 Gopls: golang.org/x/tools/gopls v0.16.0 Templ: v0.2.731

gopls.log templ.log vscode.log

joerdav commented 3 months ago

Thanks for the thorough report. This is a duplicate of https://github.com/a-h/templ/issues/801 we have a fix underway.