Skip to content

x/tools/gopls: go to implementation of a variable #71893

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

Closed
mateusz834 opened this issue Feb 22, 2025 · 2 comments
Closed

x/tools/gopls: go to implementation of a variable #71893

mateusz834 opened this issue Feb 22, 2025 · 2 comments
Labels
FeatureRequest Issues asking for a new feature that does not need a proposal. gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@mateusz834
Copy link
Member

When i want to see the type definition of a variable that is under my cursor, currently the only way to get there is to go to the declaration of the variable, which in most cases is a function call, go to def of that call, move cursor to the results list and go to definition of that type.

It would be nice if the "go to implementation" action, when called on a *types.Var would go to the type definition of that var under my cursor.

CC @golang/tools-team

@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Feb 22, 2025
@gopherbot gopherbot added this to the Unreleased milestone Feb 22, 2025
@gabyhelp
Copy link

Related Issues

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

@gabyhelp gabyhelp added the FeatureRequest Issues asking for a new feature that does not need a proposal. label Feb 22, 2025
@mateusz834
Copy link
Member Author

Oh, only now realized looking at lsp docs that there is a https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_typeDefinition and it seems to work with gopls.

@mateusz834 mateusz834 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest Issues asking for a new feature that does not need a proposal. gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

3 participants