Skip to content
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

feat(lsp): Support gotoDefinition from go->templ #932

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tris203
Copy link
Contributor

@tris203 tris203 commented Sep 24, 2024

Support goToDefinition from a go file to a templ file.

Steps to test:

  1. Attach both gopls and templ lsp to a main.go buffer
  2. GoToDefinition
  3. Profit

Caveats, because gopls and templ are attached, both references will be returned. Editor settings can be used to set preference to select from a list or go to the preferred option (probably the templ file)

When and if this was merged, it would need further adjustments to neovim/lspconfig to attach templ to go files too and would probably need a change in the vscode extension for the same

Closes #387

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

Successfully merging this pull request may close these issues.

lsp: Support goToDefinition from a Go file to a templ file
2 participants