nvim-tree / nvim-tree.lua

A file explorer tree for neovim written in lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UI dialogs in floating windows, rename, confirm etc.

kutsan opened this issue · comments

With neovim/neovim#16251 on the way, I think it would be a better user-experience to have user inputs via floating windows. Something like this:

image

I think vim.ui.input() should be used here. Exact implementation would fall onto users' shoulders (default, custom or plugin).

@gegoune Yes, I agree I forgot about vim.ui module.

commented

i agree too :) i started doing that back then but dropped it.
the rename and create modules should be rewritten using this i guess.

commented

I'm not sure that vim.ui.* can allow doing this though, i'd like to see someone that has overriden the default behavior per module.

I'm not sure what you mean on the per-module, but I'm using dressing.nvim and that gets me floating rename dialogs with nvim-tree.

I just tested it and it works perfectly fine with dressing.nvim. Create and rename works but confirm dialogs still use command-line.

commented

i see :) This can be closed than for now, it's indeed possible to override vim.ui.* for specific plugins. We'll need to refactor the remaining features to use this.

Thanks @kyazdani42! That’s coming along nicely. :)