chore: refacto populate filtering

move `nvim_tree_ignore` and `nvim_tree_hide_dotfiles` to setup
This commit is contained in:
kiyan
2021-10-30 12:25:09 +02:00
parent f92b7e7627
commit a6c1d45dd6
6 changed files with 83 additions and 90 deletions

View File

@@ -110,6 +110,10 @@ function.
custom_only = false,
list = {}
}
},
filters = {
dotfiles = false,
custom = {}
}
}
<
@@ -261,10 +265,22 @@ Here is a list of the options available in the setup call:
type: `boolean`
default: false
- |view,mappings.list|: a list of keymaps that will extend or override the default keymaps
- |view.mappings.list|: a list of keymaps that will extend or override the default keymaps
type: list of `{ key: table of strings or string, mode: string (vim-mode), cb: callback function as a string }`
default: {}
*nvim-tree.filters*
|filters|: filtering options
- |filters.dotfiles|: do not show `dotfiles` (files starting with a `.`)
type: `boolean`
default: `false`
- |filters.custom|: custom list of string that will not be shown.
type: `{string}`
default: `{}`
==============================================================================
OPTIONS *nvim-tree-options*
@@ -280,13 +296,6 @@ width of the window, can be *width_in_columns* or *'width_in_percent%'*
where the window will open (default to 'left')
- 'left' or 'right'
|g:nvim_tree_ignore| *g:nvim_tree_ignore*
An array of strings that the tree won't load and display.
useful to hide large data/cache folders.
>
example: let g:nvim_tree_ignore = [ '.git', 'node_modules' ]
|g:nvim_tree_gitignore| *g:nvim_tree_gitignore*
Determines whether to include in g:nvim_tree_ignore
@@ -384,12 +393,6 @@ Default is 0
Can be `0` or `1`. When `1`, will display indent markers when folders are open
Default is 0
|g:nvim_tree_hide_dotfiles| *g:nvim_tree_hide_dotfiles*
Can be `0` or `1`. When `1`, will hide dotfiles, files or folders which start
with the `.` character.
Default is 0
|g:nvim_tree_root_folder_modifier| *g:nvim_tree_root_folder_modifier*
In what format to show root folder. See `:help filename-modifiers` for