-
-
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
First hover differs from subsequent hovers #3062
Comments
Actually, this happens for each symbol for each file. For example, if I add an expression with |
If I understand correctly, hover behavior is designed to respond to necessary info asap, here we respond to type info first and attach other comments while available. To verify this, you can open a project and wait for some while, hover on |
I tried waiting 60+ seconds and the behaviour is the same. So I don't think this depends on any timing. From what I gather, the |
The same behavior occurs on Windows with vscode. The following science experiment shows it doesn't seem to have anything to do with the amount of time being waited
This would appear to demonstrate that the act of demanding a hover in step 5 results in a change in state that is only then accessible when you re-request a hover in step 7. In the event a hover event is going to trigger a time consuming operation, it would make sense to me to make a best-effort and at least give it a second or two before timing out and defaulting to a more basic response |
I would gladly suffer a delay to get this more reliably as it's pretty much the only thing I use the hover for (or better yet maybe some dedicated call for getting these links) For any neovim users, here's a workaround which calls hover twice in quick succession to get and open the link: mrcjkb/haskell-tools.nvim#395 (comment) |
When opening a file, the first hover request is missing some information (like description and documentation links) compared to later requests. This happens for each file opened for the first time during an HLS session. The RPC requests appears to be identical (except for the
id
field), so I'm ruling out the client as a source of the issue.hover.mp4
Your environment
Which OS do you use?
NixOS
Which version of GHC do you use and how did you install it?
9.0.2 from Nix
How is your project built (alternative: link to the project)?
I can reproduce this issue with both Cabal and standalone modules/files.
Which LSP client (editor/plugin) do you use?
Neovim LSP client
Which version of HLS do you use and how did you install it?
1.7.0.0 from Nix
Have you configured HLS in any way (especially: a
hie.yaml
file)?Using
implicit-hie
for Cabal projects, no configuration for standalone modules/files.Steps to reproduce
Expected behaviour
First hover should give the same information as the second hover.
Actual behaviour
First hover is missing information like description and documentation links.
Debug information
LSP logs for the first hover:
LSP log for the second hover:
Full LSP log for the session: lsp.log
The text was updated successfully, but these errors were encountered: