From 9066cbf3f7723b77dbe32993f6ff9644916512ac Mon Sep 17 00:00:00 2001 From: Andreas Bissinger Date: Mon, 18 Apr 2022 15:36:55 +0200 Subject: [PATCH] feat: add file completion (#1163) --- lua/nvim-tree/actions/create-file.lua | 2 +- lua/nvim-tree/actions/rename-file.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/nvim-tree/actions/create-file.lua b/lua/nvim-tree/actions/create-file.lua index 6d65e517..754e3764 100644 --- a/lua/nvim-tree/actions/create-file.lua +++ b/lua/nvim-tree/actions/create-file.lua @@ -62,7 +62,7 @@ function M.fn(node) local containing_folder = get_containing_folder(node) - local input_opts = { prompt = "Create file ", default = containing_folder } + local input_opts = { prompt = "Create file ", default = containing_folder, completion = "file" } vim.ui.input(input_opts, function(new_file_path) if not new_file_path or new_file_path == containing_folder then diff --git a/lua/nvim-tree/actions/rename-file.lua b/lua/nvim-tree/actions/rename-file.lua index 5e359f69..f699db89 100644 --- a/lua/nvim-tree/actions/rename-file.lua +++ b/lua/nvim-tree/actions/rename-file.lua @@ -17,7 +17,7 @@ function M.fn(with_sub) local namelen = node.name:len() local abs_path = with_sub and node.absolute_path:sub(0, namelen * -1 - 1) or node.absolute_path - local input_opts = { prompt = "Rename to ", default = abs_path } + local input_opts = { prompt = "Rename to ", default = abs_path, completion = "file" } vim.ui.input(input_opts, function(new_file_path) if not new_file_path then