#1050 #1068 various default options tweaks (#1074)

This commit is contained in:
Alexander Courtis
2022-03-18 21:35:15 +11:00
committed by GitHub
parent ecbe3ade95
commit 20797a8d74
7 changed files with 189 additions and 219 deletions

105
README.md
View File

@@ -108,68 +108,76 @@ highlight NvimTreeFolderIcon guibg=blue
```lua
-- init.lua
-- following options are the default
-- empty setup using defaults: add your own options
require'nvim-tree'.setup {
}
-- OR
-- setup with all defaults
-- each of these are documented in `:help nvim-tree.OPTION_NAME`
require'nvim-tree'.setup {
disable_netrw = false,
hijack_netrw = true,
open_on_setup = false,
ignore_buffer_on_setup = false,
ignore_ft_on_setup = {},
auto_close = false,
[//]: <> (BEGIN_DEFAULT_OPTS)
auto_close = false,
auto_reload_on_write = true,
open_on_tab = false,
hijack_cursor = false,
update_cwd = false,
disable_netrw = false,
hide_root_folder = false,
hijack_cursor = false,
hijack_netrw = true,
hijack_unnamed_buffer_when_opening = false,
hijack_directories = {
ignore_buffer_on_setup = false,
open_on_setup = false,
open_on_tab = false,
sort_by = "name",
update_cwd = false,
view = {
width = 30,
height = 30,
side = "left",
preserve_window_proportions = false,
number = false,
relativenumber = false,
signcolumn = "yes",
mappings = {
custom_only = false,
list = {
-- user mappings go here
},
},
},
hijack_directories = {
enable = true,
auto_open = true,
},
update_focused_file = {
enable = false,
update_cwd = false,
ignore_list = {},
},
ignore_ft_on_setup = {},
system_open = {
cmd = nil,
args = {},
},
diagnostics = {
enable = false,
show_on_dirs = false,
icons = {
hint = "",
info = "",
warning = "",
error = "",
}
},
update_focused_file = {
enable = false,
update_cwd = false,
ignore_list = {}
},
system_open = {
cmd = nil,
args = {}
},
},
filters = {
dotfiles = false,
custom = {}
custom = {},
exclude = {},
},
git = {
enable = true,
ignore = true,
timeout = 500,
},
view = {
width = 30,
height = 30,
hide_root_folder = false,
side = 'left',
preserve_window_proportions = false,
mappings = {
custom_only = false,
list = {}
},
number = false,
relativenumber = false,
signcolumn = "yes"
},
trash = {
cmd = "trash",
require_confirm = true
timeout = 400,
},
actions = {
change_dir = {
@@ -183,11 +191,15 @@ require'nvim-tree'.setup {
enable = true,
chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890",
exclude = {
filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame", },
buftype = { "nofile", "terminal", "help", },
}
}
}
filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame" },
buftype = { "nofile", "terminal", "help" },
},
},
},
},
trash = {
cmd = "trash",
require_confirm = true,
},
log = {
enable = false,
@@ -198,6 +210,7 @@ require'nvim-tree'.setup {
git = false,
},
},
[//]: <> (END_DEFAULT_OPTS)
}
```