-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
Hover does not work for type symbols from external packages #717
Comments
This fixes hover for types, classes and type variables. Information about spans includes a `Maybe Type` which is `Just` for data-level expressions and `Nothing` for type-level expressions. `AtPoint.atPoint` which is the oddly-named function responsible for constructing hover information, runs in the `Maybe` monad, and aborted at the first sight of a `Nothing`, thus producing no hover information for type-level spans. In the process of fixing this, I have refactored the function to + separate the construction of data-level and type-level hover info + make the components that make up the hover info (and their construction) more clear I can see plenty little improvements that could be made to the functionality of the code (and lots that could be made to its organization), but the most important fixes of the basic missing functionality are here. Fix #249 Fix #250
This fixes hover for types, classes and type variables. Information about spans includes a `Maybe Type` which is `Just` for data-level expressions and `Nothing` for type-level expressions. `AtPoint.atPoint` which is the oddly-named function responsible for constructing hover information, runs in the `Maybe` monad, and aborted at the first sight of a `Nothing`, thus producing no hover information for type-level spans. In the process of fixing this, I have refactored the function to + separate the construction of data-level and type-level hover info + make the components that make up the hover info (and their construction) more clear I can see plenty little improvements that could be made to the functionality of the code (and lots that could be made to its organization), but the most important fixes of the basic missing functionality are here. Fix #249 Fix #250
I've just test this and goto def to external packages does not work but hover on external values/types does |
Test in hls are in: haskell-language-server/ghcide/test/exe/Main.hs Lines 2487 to 2488 in d4f5d43
haskell-language-server/ghcide/test/exe/Main.hs Lines 2517 to 2518 in d4f5d43
|
I believe it works now. |
Afaik the broken mark in tests should make the test fail if they are fixed. Although maybe they fail for another reason. |
I regret that I don't have the time to work on this any more. 😞
Yes, that was the original intention when I wrote these tests. IIRC, it did actually work like that, at least at the beginning. |
It happened to me for the |
I'm not sure if this ticket is still relevant. There are other tickets for goto definition like #708 Feel free to re-open this ticket with a clarification. |
We should enable the test for it too. doing at #4241 |
... as documented by the tests titled type constructor from other package, value from other package and external class is signature.
To be precise, hover does work for external values, but not types.
The text was updated successfully, but these errors were encountered: