Navigation Menu

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

x/tools/gopls: support LocationLink for relevant requests #40195

Open
aktau opened this issue Jul 13, 2020 · 0 comments
Open

x/tools/gopls: support LocationLink for relevant requests #40195

aktau opened this issue Jul 13, 2020 · 0 comments
Labels
FeatureRequest gopls Issues related to the Go language server, gopls. help wanted Tools This label describes issues relating to any tools in the x/tools repository.

Comments

@aktau
Copy link
Contributor

aktau commented Jul 13, 2020

When requesting textDocument/definition gopls returns a Location.

This FR is about supporting returning a LocationLink instead for clients that support it (a client capability).

Rationale: some editors/plugins can use this to support previewing the entire function on hover. See neovim/neovim#12218 and neovim/neovim#12368 for an in-depth description.

In terms of other language servers that do this, it looks like rust-analyzer does it as well.

All (current) LSP actions that can return LocationLink's:

  • textDocument/declaration
  • textDocument/definition
  • textDocument/typeDefinition
@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 Jul 13, 2020
@gopherbot gopherbot added this to the Unreleased milestone Jul 13, 2020
@stamblerre stamblerre changed the title x/tools/gopls: support returning LocationLink (instead of only Location) for textDocument/definition (and possibly a few others) x/tools/gopls: support LocationLink for relevant requests Jul 13, 2020
@stamblerre stamblerre removed this from the Unreleased milestone Jul 13, 2020
@stamblerre stamblerre added this to the gopls/unplanned milestone Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest gopls Issues related to the Go language server, gopls. help wanted 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