nvim-neo-tree / neo-tree.nvim

Neovim plugin to manage the file system and other tree like structures.
MIT License
3.94k stars 227 forks source link

How to completion in input window? #820

Open adoyle-h opened 1 year ago

adoyle-h commented 1 year ago

I'm using https://github.com/hrsh7th/nvim-cmp and I want to complete paths in input window when add/rename/move/copy the files and directories.

CleanShot 2023-03-21 at 15 14 49@2x

I read the code and find it is not work.

  1. The callers of inputs.input not pass the parameter completion.

https://github.com/nvim-neo-tree/neo-tree.nvim/blob/20c2f2f5ba083bbb1e37b8bc3d590621434f31e9/lua/neo-tree/sources/filesystem/lib/fs_actions.lua#L334-L383

https://github.com/nvim-neo-tree/neo-tree.nvim/blob/20c2f2f5ba083bbb1e37b8bc3d590621434f31e9/lua/neo-tree/ui/inputs.lua#L32-L53

  1. When use_popups_for_input = true, should_use_popup_input() is true. But there is no handle for completion, and the nui.input has no completion option.

Do you have any plan to implement the completion? I could help to implement it. I just want to use nvim-cmp to complete paths and use the keymaps of nvim-cmp to trigger completion.

cseickel commented 1 year ago

Do you have any plan to implement the completion? I could help to implement it. I just want to use nvim-cmp to complete paths and use the keymaps of nvim-cmp to trigger completion.

I have no plans to add this feature, but it sounds like a great idea if you can get it to work!

franklouwers commented 8 months ago

Would be awesome!

Curs3W4ll commented 5 months ago

Would live to see it too <3