feat: add ui.confirm.remove and ui.confirm.trash, deprecate trash.require_confirm (#1887)

* Implement turning off y/n prompt for file deletion

* Refactor different prompt configs to single ui table

* Remove unused fields

* add ui.confirm doc, format/tidy

* trash.require_confirm -> ui.confirm.trash

* Fix nil value trash field

Co-authored-by: Alexander Courtis <alex@courtis.org>
This commit is contained in:
Telman Babayev
2023-01-08 10:43:01 +04:00
committed by GitHub
parent 5b554a9e2d
commit ccb6d8a518
5 changed files with 66 additions and 31 deletions

View File

@@ -374,7 +374,6 @@ Subsequent calls to setup will replace the previous configuration.
},
trash = {
cmd = "gio trash",
require_confirm = true,
},
live_filter = {
prefix = "[FILTER]: ",
@@ -390,6 +389,12 @@ Subsequent calls to setup will replace the previous configuration.
notify = {
threshold = vim.log.levels.INFO,
},
ui = {
confirm = {
remove = true,
trash = true,
},
},
log = {
enable = false,
truncate = false,
@@ -993,10 +998,6 @@ Configuration options for trashing.
The default is shipped with glib2 which is a common linux package.
Type: `string`, Default: `"gio trash"`
*nvim-tree.trash.require_confirm*
Show a prompt before trashing takes place.
Type: `boolean`, Default: `true`
*nvim-tree.actions*
Configuration for various actions.
@@ -1146,6 +1147,20 @@ Configuration for notification.
`INFO:` information only e.g. file copy path confirmation.
`DEBUG:` not used.
*nvim-tree.ui*
General UI configuration.
*nvim-tree.ui.confirm*
Confirmation prompts.
*nvim-tree.ui.confirm.remove*
Prompt before removing.
Type: `boolean`, Default: `true`
*nvim-tree.ui.confirm.trash* (previously `trash.require_confirm`)
Prompt before trashing.
Type: `boolean`, Default: `true`
*nvim-tree.log*
Configuration for diagnostic logging.