LanguageClient-neovim icon indicating copy to clipboard operation
LanguageClient-neovim copied to clipboard

Make (floating) hover window disappear on *any* action (besides another Hover)

Open lesurp opened this issue 5 years ago • 2 comments

Is your feature request related to a problem? Please describe.

Right now, the floating hover window only disappears on a cursor move; the idea being that, on another 'hover' call we can move into the floating window.

However, other actions (ie goto definition, saving..) may be requested - and in this case, the cursor is moved to the floating window and breaks the intended behavior (see gif below). It is especially problematic if one wants to use an autocmd ie autocmd CursorHold *.cpp call LanguageClient_textDocument_hover()

Describe the solution you'd like

I think the simplest solution would be to close the floating window on any action that's not an hover request

I will have some time soon to help contribute to this great plugin - so I'll gladly work on this issue, but obviously I'd like to know what you think of it first :)

hooover

lesurp avatar Apr 05 '19 13:04 lesurp

Hmm setting a higher value to the updatetime helps but the problems still occurs sometimes (mostly when saving)

lesurp avatar Apr 05 '19 14:04 lesurp

I guess implementing LanguageClient_textDocument_close_hover() which ensures to close hover solves your issue.

autocmd CursorHold *.cpp call LanguageClient_textDocument_close_hover() | call LanguageClient_textDocument_hover()

I would be glad to implement it if it solves your issue. Please let me know your thought.

rhysd avatar Apr 11 '19 02:04 rhysd