feat: add kind param to vim.ui.select function calls (#2602)
* feat: add kind param to vim.ui.select function calls * feat: add kind param to prompts for bookmark actions * docs: add section for prompts * docs: add section for prompts --------- Co-authored-by: Alexander Courtis <alex@courtis.org>
This commit is contained in:
@@ -131,7 +131,7 @@ local function do_single_paste(source, dest, action_type, action_fn)
|
||||
else
|
||||
local prompt_select = "Overwrite " .. dest .. " ?"
|
||||
local prompt_input = prompt_select .. " R(ename)/y/n: "
|
||||
lib.prompt(prompt_input, prompt_select, { "", "y", "n" }, { "Rename", "Yes", "No" }, function(item_short)
|
||||
lib.prompt(prompt_input, prompt_select, { "", "y", "n" }, { "Rename", "Yes", "No" }, "nvimtree_overwrite_rename", function(item_short)
|
||||
utils.clear_prompt()
|
||||
if item_short == "y" then
|
||||
on_process()
|
||||
|
||||
@@ -130,7 +130,7 @@ function M.fn(node)
|
||||
items_long = { "No", "Yes" }
|
||||
end
|
||||
|
||||
lib.prompt(prompt_input, prompt_select, items_short, items_long, function(item_short)
|
||||
lib.prompt(prompt_input, prompt_select, items_short, items_long, "nvimtree_remove", function(item_short)
|
||||
utils.clear_prompt()
|
||||
if item_short == "y" or item_short == (M.config.ui.confirm.default_yes and "") then
|
||||
do_remove()
|
||||
|
||||
@@ -102,7 +102,7 @@ function M.fn(node)
|
||||
items_long = { "No", "Yes" }
|
||||
end
|
||||
|
||||
lib.prompt(prompt_input, prompt_select, items_short, items_long, function(item_short)
|
||||
lib.prompt(prompt_input, prompt_select, items_short, items_long, "nvimtree_trash", function(item_short)
|
||||
utils.clear_prompt()
|
||||
if item_short == "y" or item_short == (M.config.ui.confirm.default_yes and "") then
|
||||
do_trash()
|
||||
|
||||
Reference in New Issue
Block a user