A way of switching to the hover doc window immediately after it appears #1486
Shaobin-Jiang
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I seem to recall that people have suggested that
<C-w>wwould do the trick, switching to the hover doc. However, it does not always work. If you have a vertical split and open the hover doc in the left window,<C-w>wbrings you to the window on the right instead of the hover doc.Instead of using that keybinding, doing something like below would open the hover doc and move the cursor directly into it.
I initially started out by calling
require("lspsaga.hover").winidright after calling theLspsagacommand, but the value isniland I could only get a valid winid by usingvim.defer_fnto acquire it after about 100ms. This new approach seems more secure and efficient.Beta Was this translation helpful? Give feedback.
All reactions