Skip to content

VSCode Plugin (templ-vscode) repeated errors for failed actions. #1089

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
coraxwolf opened this issue Mar 6, 2025 · 1 comment
Open

VSCode Plugin (templ-vscode) repeated errors for failed actions. #1089

coraxwolf opened this issue Mar 6, 2025 · 1 comment

Comments

@coraxwolf
Copy link

I am using vscode to work on this project using templ with the templ-vscode plugin. I keep getting errors about failed actions. I have the current version of templ installed in my GOPATH and the templ tool works fine. I just don't know what to do to stop these lsp errors.

They seem to all deal with columns being beyond the end of the line.

Here is a sample of my output:

[Error - 3:18:08 PM] Request textDocument/codeAction failed.
  Message: column is beyond end of line
  Code: 0 
[Error - 3:18:08 PM] Request textDocument/hover failed.
  Message: column is beyond end of line
  Code: 0 
[Error - 4:39:09 PM] 2025/03/05 16:39:09 no completions found: column is beyond end of line
	position=196:4

[Error - 4:39:09 PM] Request textDocument/codeAction failed.
  Message: column is beyond end of line
  Code: 0 
[Error - 4:39:09 PM] 2025/03/05 16:39:09 no completions found: column is beyond end of line
	position=196:5
@a-h
Copy link
Owner

a-h commented Mar 15, 2025

The templ LSP can run a web server and show you where the problem might be, because it shows the mapping between source code and what the gopls LSP is seeing.

https://templ.guide/developer-tools/ide-support/#troubleshooting-1

There's also a way to get logs to help diagnose the problem further.

Also, templ info provides some information about the templ environment (OS, program versions etc.).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants