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

Comments

@aktau
Copy link

@aktau 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 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.