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:
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.
i agree too :) i started doing that back then but dropped it.
the rename and create modules should be rewritten using this i guess.
hasn't this been implemented, for rename at least? https://github.com/kyazdani42/nvim-tree.lua/blob/master/lua/nvim-tree/actions/rename-file.lua#L22
(vim.ui.*)
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.
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. :)