nvim-neo-tree/neo-tree.nvim

How to completion in input window?

Open

#820 opened on Mar 21, 2023

View on GitHub
 (3 comments) (3 reactions) (0 assignees)Lua (291 forks)batch import
enhancementhelp wanted

Repository metrics

Stars
 (5,436 stars)
PR merge metrics
 (Avg merge 23h 19m) (7 merged PRs in 30d)

Description

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.

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.

Contributor guide