Skip to content
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

Documentation Link in Hover doesn't always display #604

Closed
mjrussell opened this issue Apr 30, 2022 · 4 comments
Closed

Documentation Link in Hover doesn't always display #604

mjrussell opened this issue Apr 30, 2022 · 4 comments

Comments

@mjrussell
Copy link

mjrussell commented Apr 30, 2022

Your environment

Which OS do you use:

MacOS M1

Steps to reproduce

I have 2 projects using the same VScode instance, latest plugin version (2.2.0), same HLS version (1.7.0) and stack (1.7.5) and GHC version (8.10.7).

In both of these projects, I can consistently get the Documentation Hover to show up which is great. What is less consistent is the hyperlink for the Documentation to open on Hackage.

It seems to work properly for things like base as you can see here

image

But no so for Conduit, esqueleto, monad-logger, or other dependencies.

image

image

image

Expected behaviour

Displays the Documentation link

Actual behaviour

Sometimes Displays the Documentation Link

Extra

My setup is a little difficult to run the debugging HLS command, because of some pathing interactions with GHCUP, but you can pretty easily reproduce also with this small repo + branch - https://github.com/mjrussell/haddocset/tree/bump-lts-18. I was trying to get dash docsets, but would rather see now about integrating this better into Vscode Haskell. Im interested in trying to contribute to vscode-haskell myself, but would appreciate some pointers if anyone has ideas on what might be wrong.

Mildly related, but is there also a way to programmatically do this command (Click on Documentation)? Would love a keyboard shortcut to open on hackage for text underneath the cursor. Similar to Go To Definition.

@mjrussell mjrussell changed the title Documentation Link Documentation Link in Hover doesn't always display Apr 30, 2022
@mjrussell
Copy link
Author

I did find the commands:
haskell.openDocumentationOnHackage and haskell.showDocumentation those both return some errors if i try to invoke them with my text on a cursor:
Cannot destructure property 'hackageUri' of 'undefined' as it is undefined.

@elldritch
Copy link

I can confirm this. For me, the documentation only shows up on exports from base packages.

When I build my dependencies with documentation: True, I do get a documentation link on non-base packages, but they seem malformed and always point to the html package, which is almost always wrong.

@pepeiborra
Copy link
Contributor

pepeiborra commented May 28, 2022

For docs embedded in hover popups https://haskell-language-server.readthedocs.io/en/latest/configuration.html#how-to-show-local-documentation-on-hover

For hackage links there are other open issues already.

@elldritch
Copy link

Ah, yup, I see #520 now - I was searching the wrong keywords the first time around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants