refacto: move some code into actions

(non breaking, old assignments link to new assignments)
- move lib.collapse-all into actions/collapse-all
- move lib.dir-up into actions/dir-up
- move lib.change-dir into actions/change-dir
- use setup option for change-dir global (and use the old option for
  setup)
This commit is contained in:
kiyan
2022-02-05 17:42:40 +01:00
parent 95e3aacc01
commit f74dd24c58
8 changed files with 107 additions and 57 deletions

View File

@@ -126,6 +126,11 @@ function.
trash = {
cmd = "trash",
require_confirm = true,
},
actions = {
change_dir = {
global = false,
}
}
}
<
@@ -354,6 +359,15 @@ Here is a list of the options available in the setup call:
type: `boolean`
default: `true`
*nvim-tree.actions*
|actions|: configuration for various actions
- |actions.change_dir.global|: use `:cd` instead of `:lcd` when changing
directories. Consider that this might cause issues with
the |update_cwd| options.
type: `boolean`
default: `false`
==============================================================================
OPTIONS *nvim-tree-options*
@@ -485,10 +499,6 @@ default table is
["readme.md"] = true,
}
|g:nvim_tree_change_dir_global| *g:nvim_tree_change_dir_global*
Can be 0 or 1. When 1, use :cd instead of :lcd when changing directories.
|g:nvim_tree_disable_window_picker| *g:nvim_tree_disable_window_picker*
Can be 0 or 1. When 1, will disable the window picker. Files will open in the