daa84 / neovim-gtk

gtk ui for neovim
GNU General Public License v3.0
716 stars 57 forks source link

completion popup exceed window margins (unreadable) #162

Open cinghiopinghio opened 5 years ago

cinghiopinghio commented 5 years ago

Hi, I'm using your project on a daily basis, very nice. When completion pop-up menu show up it sometimes get out of the window and it become impossible to know what I'm selecting. This is because of the documentation shown at the bottom of the menu that is pushing the menu too high. for the completion I'm using Deoplete + LanguageClient-neovim.

See the screenshot: gscreenshot_2018-11-30-110551

daa84 commented 5 years ago

What can be good solution in this case? Add scroll or just limit size?

cinghiopinghio commented 5 years ago

The possible solutions I can see:

  1. if horizontal space is available just put it side by side
  2. reserve a fixed amount (or percentage, say 25%) of space for the docs as footer (if one needs the full docs she should use the appropriate tools to show them).
  3. alternatively use a fixed amount of space as above but with the two separately scrollable areas (ideally one should be able to drag the border between those two areas but maybe this goes beyond what a completion popup should do).

I propend for the first solution if horizontal space is available and rolling back to the third otherwise. Maybe the second solution is the easier to implement right now. (I don't really know since I don't know neither rust nor gtk).

daa84 commented 5 years ago

with last change you can disable preview label with set completeopt=menu

cinghiopinghio commented 5 years ago

Indeed, but this break my configuration for plain nvim. No big deal, maybe it would be better (as for other configuration options) to give the user the choice to intercept or not the preview.