-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnvim-tree.lua
111 lines (106 loc) · 2.91 KB
/
nvim-tree.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
local M = {}
function M.setup()
local tree = require("nvim-tree")
tree.setup({
create_in_closed_folder = true,
hijack_cursor = true,
open_on_setup = true,
open_on_setup_file = true,
focus_empty_on_setup = true,
sync_root_with_cwd = true,
view = {
adaptive_size = false,
mappings = {
list = {
{ key = { "<2-RightMouse>", "<C-]>" }, action = "" }, -- cd
{ key = "<C-v>", action = "" }, -- vsplit
{ key = "<C-x>", action = "" }, -- split
{ key = "<C-t>", action = "" }, -- tabnew
{ key = "<BS>", action = "" }, -- close_node
{ key = "<Tab>", action = "" }, -- preview
{ key = "D", action = "" }, -- trash
{ key = "[e", action = "" }, -- prev_diag_item
{ key = "]e", action = "" }, -- next_diag_item
{ key = "[c", action = "" }, -- prev_git_item
{ key = "]c", action = "" }, -- next_git_item
{ key = "-", action = "" }, -- dir_up
{ key = "s", action = "" }, -- system_open
{ key = "W", action = "" }, -- collapse_all
{ key = "g?", action = "" }, -- toggle_help
{ key = "d", action = "cd" }, -- remove
{ key = "x", action = "remove" }, -- cut
{ key = "t", action = "cut" },
{ key = "<Space>p", action = "prev_diag_item" },
{ key = "<Space>.", action = "next_diag_item" },
{ key = "<Space>k", action = "prev_git_item" },
{ key = "<Space>j", action = "next_git_item" },
{ key = "u", action = "dir_up" },
{ key = "'", action = "close_node" },
{ key = '"', action = "collapse_all" },
{ key = "?", action = "toggle_help" },
},
},
},
renderer = {
full_name = true,
group_empty = true,
special_files = {},
symlink_destination = false,
indent_markers = {
enable = true,
},
icons = {
git_placement = "signcolumn",
show = {
file = true,
folder = false,
folder_arrow = false,
git = true,
},
},
},
update_focused_file = {
enable = true,
update_root = true,
ignore_list = { "help" },
},
diagnostics = {
enable = true,
show_on_dirs = true,
},
filters = {
custom = {
"^.git$",
},
},
actions = {
change_dir = {
enable = false,
restrict_above_cwd = true,
},
open_file = {
resize_window = true,
window_picker = {
chars = "aoeui",
},
},
remove_file = {
close_window = false,
},
},
log = {
enable = false,
truncate = true,
types = {
all = false,
config = false,
copy_paste = false,
diagnostics = false,
git = false,
profile = false,
watcher = false,
},
},
})
end
return M