golang/go
x/tools/gopls: support LocationLink for relevant requests
Offen
#40.195 geöffnet am 13.07.2020
FeatureRequestToolsgoplshelp wanted
Repository-Metriken
- Stars
- (133.883 Sterne)
- PR-Merge-Metriken
- (Keine gemergten PRs in 30 T)
Beschreibung
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 https://github.com/neovim/neovim/issues/12218 and https://github.com/neovim/neovim/pull/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/declarationtextDocument/definitiontextDocument/typeDefinition