microsoft / microsoft/language-server-protocol
Add "Go to Interfaces" counterpart of "Go to Implementations"
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13k
- Forks
- 1k
- Avg merge
- 6d 1h
- Merged PRs (30d)
- 10
Description
Background: The "Go to Implementations" feature of VS Code, which corresponds to the textDocument/implementation LSP request, is defined to return all the concrete implementations of a given interface or abstract type. In other words, the query is inherently "downwards" with respect to the type hierarchy.
The corresponding "upwards" query is equally useful. In some LSP servers, such as gopls for Go, the behavior of this feature depends on the concreteness of the queried type. If it's an interface, the response includes types that may be assigned to it: concrete and interface types with equal or greater methods sets. If it's a concrete type, the response includes only interfaces to which the queried type may be assigned. This unfortunately leaves the user with no way to ask the question "what are the superinterfaces of this interface?", or, in Java terms, "what are the superclasses of this abstract class"? In Java there is at least the option to traverse the implements relation, which is explicitly declared, but in Go there is no syntactic relationship between implements-related types, making tooling even more important.
Proposal: we propose to add a corresponding "Go to Interfaces" (or perhaps "supertypes") feature to VS Code that would make a similar textDocument/implementation query with opposite directionality. At the LSP protocol level, this would be indicated by an optional upwards boolean in the textDocument/implementation request indicating that the direction of the query is reversed from the usual downwards behavior represented by null or false.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no repository files or tests. Start by reading the linked textDocument/implementation LSP specification and the proposal's directionality examples; determine the protocol and editor behavior needed for an agreed “Go to Interfaces” feature, then document the accepted request shape and validation path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100