vhakulinen / gnvim

GUI for neovim, without any web bloat
MIT License
1.86k stars 68 forks source link

"wildmenu" is not available when --disable-ext-cmdline #80

Closed cohama closed 1 year ago

cohama commented 5 years ago

Confirmed minimal step.

  1. gnvim --disable-ext-cmdline -- -u NONE
  2. :set wildmenu (maybe unnecessary)
  3. :set wildmode=full (maybe unnecessary)
  4. type :a<Tab> but wild menu will not appear.

My gnvim/nvim version is below.

smolck commented 5 years ago

@cohama Can you try running this with a commented out .vimrc/init.vim instead? Using -- -u NONE/-- -u NORC prevents GNvim from loading its runtime files, which I think is what's causing this problem. When I used a commented out init.vim instead, I wasn't able to reproduce this issue when using GNvim with --disable-ext-cmdline. Do you have this problem when running GNvim like this: $ gnvim --disable-ext-cmdline?

@vhakulinen @badosu Do you think we should provide an alternative to -- -u NONE that would ignore the user's init.vim/.vimrc but still load GNvim's runtime files (for debugging purposes)? Alternatively, we could find a way to still load GNvim's runtime files when it's passed -- -u NONE if that's possible. It seems that the above problem (GNvim's runtime files not being loaded when using -- -u NONE/-- -u NORC) is a recurring issue that causes users to think problems exist that don't (or at least that leads them astray when debugging).

cohama commented 5 years ago

wildmenu appeared with a commented out init.vim!

cohama commented 5 years ago

I expect wildmenu is like CUI. image

I also noticed that wildmenu dissapeared again with --disable-ext-popupmenu

In detail, with commented out init.vim, then run gnvim --disable-ext-cmdline --disable-ext-popupmenu

Is this by design?

smolck commented 5 years ago

No, I think that is a bug. This only happens if both the ext_cmdline and the ext_popupmenu are disabled (AFAIK). GNvim currently doesn't seem to support that combination. Since the wildmenu is tied to the popupmenu, it makes sense why the GUI version of the wildmenu wouldn't appear when the popupmenu is disabled, but when not external I think nvim takes care of the wildmenu (so GNvim isn't showing it for some reason).

CC: @vhakulinen @badosu

vhakulinen commented 5 years ago

There is a ext_wildmenu UI option on nvim 0.3.x, but that was incorporated into ext_popupmenu on 0.4.x, so thats why you need to disable both popupmenu and cmdline. For clarity, we should add a flag for the wildmenu too: https://github.com/vhakulinen/gnvim/blob/1d8a0425b851cd4cb821c38ac2b6a50c6b52fd07/src/main.rs#L131 and improve documentation regarding the change between nvim 0.3 and 0.4. Also, the wildmenu is currently tightly integrated into the cmdline GUI, so at the moment its not possible to use wildmenu without the cmdline.

Do you think we should provide an alternative to -- -u NONE that would ignore the user's init.vim/.vimrc but still load GNvim's runtime files (for debugging purposes)?

We should probably add a minimal vimrc into the readme. I've seen that quite a few vim plugins does that. If we pass -u NONE to nvim, it wont load any runtime files.

last-partizan commented 4 years ago

Right now wildmenu works when both cmdline and popupmenu are disabled. But it is at wrong position.

image

nikplx commented 3 years ago

I can't reproduce this issue with the latest master version anymore. @last-partizan @vhakulinen Can we close this issue?

wildmenu_right

last-partizan commented 3 years ago

Yes, i think this can be closed.

Menu positioning was wrong becouse neovim bug, and not it is fixed.