x/tools/gopls: implement type hierarchy support #72142
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
Recently, @adonovan a I were discussing the problem of finding interfaces/implementations for function types, and we (re)encountered a critical limitation of the textDocument/implementations query: there's no way to go up the type hierarchy (which matters a lot for Go!). Currently, gopls (by convention) serves implementations when asking for implementation of a concrete type. But if you're on
type HandlerFunc func(ResponseWriter, *Request)
, there's no way to query both interfaces implemented by this type (http.Handler
, in this case), and functions that implement it (all of the literal handlers in your codebase).From microsoft/language-server-protocol#2037 (comment), it sounds like the only option is to implement the textDocument/typeHierarchy request, though unfortunately this is not supported by many clients. Nevertheless, we should implement this capability.
The text was updated successfully, but these errors were encountered: