-
Notifications
You must be signed in to change notification settings - Fork 39
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
Use mouse position for diagnostic and fold preview #80
base: main
Are you sure you want to change the base?
Conversation
I assume the cursor position is still used if the key mapping is used instead? |
Is that information passed to |
This should be the default for when using the hotkeys to display on the cursor.
Okay! I managed to implement this by using |
I also managed to fix this from the PR description:
Actually, by using the bufnr provided through Fixing the other providers could require some additional work due to |
Fixes #73
Now diagnostic and fold preview show information from under the mouse on hover, not under the cursor.
I haven't changed the other providers (which also have this bug) since they depend on the cursor to get information (i.e.
<cword>
). Those could require a larger refactor.More generally, all providers seem to only work with the current window, whereas, in a window split, the current window might not be the window the mouse is hovering on, returning wrong information. Fixing this would be best done in a separate PR as the changes would be quite large.
So, for this PR, I try to bring the most value for the smallest changes. Let me know if any further changes are needed.