-
-
Notifications
You must be signed in to change notification settings - Fork 355
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
Plugins cannot define jump-to-definition handlers (responses are not combined) #3634
Comments
In fact, I think
And the other direction:
So I think what we would want to do is check the client capability for |
... and then just concatenate the results |
Currently the type the plugins provide for is the same as the ones lsp sends on to the client. I was thinking it would be nice to have a type the plugins need to provide that is separate from the actual method type the client accepts, specifically by being more specific. In this case only accepting locationlink for example, and then refactor the combine responses to convert that type into the client accepted type (ideally by querying capabilities) before combining. Separate types would allow us to enforce that the plugin is only returning our preferred type. |
Yeah, I agree that that would be nice, might be a bit of a pain to implement. But we could almost certainly provide types that are e.g. easier to combine. |
This was fixed by #3846 |
As can be seen here https://github.com/haskell/haskell-language-server/blob/master/hls-plugin-api/src/Ide/Types.hs#L555 HLS always returns the first response for jump-to-definition, which happens to be ghcide. Multiple responses could be combined into one, by turning
LocationLink
into aLocation
The text was updated successfully, but these errors were encountered: