completion-nvim icon indicating copy to clipboard operation
completion-nvim copied to clipboard

Auto hovering completion can cause unsightly overlapping for dense Flutter/Dart API.

Open bluz71 opened this issue 5 years ago • 5 comments

Hello,

This is a followup to my Reddit (Neovim LSP) How to disable diagnostics? thread where you and I briefly chatted.

Over there I noted the overlapping window issue. Here is an example of what I meant:

Overlapping

Notice that the completion stretches across the full width and then the auto-hover secondary window renders behind it.

Defining let g:completion_enable_auto_hover = 0 fixes the issue by disabling the secondary window.

Personally I don't know how this situation should be dealt with.

Feel free to close this if you so wish since disabling auto-hover is good enough for me.

Best regards.

bluz71 avatar Jun 02 '20 05:06 bluz71

This should definitely be fixed. Right now I'm trying to align the hover window the popup completion menu, but if the popup menu is too long, this will happen. Maybe I can put the hover window under the completion menu if this situation occurs, let me know what do you think:).

haorenW1025 avatar Jun 02 '20 05:06 haorenW1025

I helped implement floating window for hovering in the vim-lsc LSP plugin.

In the end we decided to hover up if we could fit in without issue or scrolling. If not we looked to see if there was more room above or below the current line and we chose to float where more space was available.

You idea seems reasonable as long as you look for where best to place, above or below depending on the amount of content you wish to display and where the most space is available.

For example if one was completing on the last line on the screen, clearly you can't float downwards.

bluz71 avatar Jun 02 '20 05:06 bluz71

Make sense, I'll implement that. Thanks for the advice:)

haorenW1025 avatar Jun 02 '20 11:06 haorenW1025

Correct me if I'm wrong but currently the hover window is located behind the popup completion. Because of this, the scroll covers part of the hover window. It doesn't look too good.

image

marekkon avatar Jun 02 '20 17:06 marekkon

@marekkon You're right i didn't notice the scroll bar. Will also make the change.

haorenW1025 avatar Jun 03 '20 08:06 haorenW1025