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
-
I seem to recall that people have suggested that
<C-w>w
would 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>w
brings 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").winid
right after calling theLspsaga
command, but the value isnil
and I could only get a valid winid by usingvim.defer_fn
to acquire it after about 100ms. This new approach seems more secure and efficient.Beta Was this translation helpful? Give feedback.
All reactions