-
-
Notifications
You must be signed in to change notification settings - Fork 634
Expand file tree
/
Copy pathactions.lua
More file actions
138 lines (117 loc) · 4.37 KB
/
Copy pathactions.lua
File metadata and controls
138 lines (117 loc) · 4.37 KB
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
---@meta
error("Cannot require a meta file")
---@class nvim_tree.config.actions
---
---Use the system clipboard for copy/paste. Copied text will be stored in registers `+` (system), otherwise, it will be stored in `1` and `"`
---(default: `true`)
---@field use_system_clipboard? boolean
---
---[nvim_tree.config.actions.change_dir]
---@field change_dir? nvim_tree.config.actions.change_dir
---
---[nvim_tree.config.actions.expand_all]
---@field expand_all? nvim_tree.config.actions.expand_all
---
---[nvim_tree.config.actions.file_popup]
---@field file_popup? nvim_tree.config.actions.file_popup
---
---[nvim_tree.config.actions.open_file]
---@field open_file? nvim_tree.config.actions.open_file
---
---[nvim_tree.config.actions.remove_file]
---@field remove_file? nvim_tree.config.actions.remove_file
--- vim [current-directory] behaviour
---@class nvim_tree.config.actions.change_dir
---
---Change the working directory when changing directories in the tree
---(default: `true`)
---@field enable? boolean
---
---Use `:cd` instead of `:lcd` when changing directories.
---(default: `false`)
---@field global? boolean
---
--- Restrict changing to a directory above the global cwd.
---(default: `false`)
---@field restrict_above_cwd? boolean
---Configure [nvim_tree.api.tree.expand_all()] and [nvim_tree.api.node.expand()]
---@class nvim_tree.config.actions.expand_all
---
---Limit the number of folders being explored when expanding every folder. Avoids hanging Nvim when running this action on very large folders.
---(default: `300`)
---@field max_folder_discovery? integer
---
---A list of directories that should not be expanded automatically e.g `{ ".git", "target", "build" }`
---(default: `{}`)
---@field exclude? string[]
---{file_popup} floating window.
---
---{open_win_config} is passed to [nvim_open_win()], default:
---```lua
--- {
--- col = 1,
--- row = 1,
--- relative = "cursor",
--- border = "shadow",
--- style = "minimal",
--- }
---```
---You shouldn't define {width} and {height} values here. They will be overridden to fit the file_popup content.
---@class nvim_tree.config.actions.file_popup
---
---(default: `{ col = 1, row = 1, relative = "cursor", border = "shadow", style = "minimal", }`)
---@field open_win_config? vim.api.keyset.win_config
---Opening files.
---@class nvim_tree.config.actions.open_file
---
---Closes the explorer when opening a file
---(default: `false`)
---@field quit_on_open? boolean
---
---Prevent new opened file from opening in the same window as the tree.
---(default: `true`)
---@field eject? boolean
---
---Resizes the tree when opening a file
---(default: `true`)
---@field resize_window? boolean
---
---[nvim_tree.config.actions.open_file.window_picker]
---@field window_picker? nvim_tree.config.actions.open_file.window_picker
---A window picker will be shown when there are multiple windows available to open a file. It will show a single character identifier in each window's status line.
---
---When it is not enabled the file will open in the window from which you last opened the tree, obeying {exclude}
---
---You may define a {picker} function that should return the window id that will open the node, or `nil` if an invalid window is picked or user cancelled the action. The picker may create a new window.
---
---@class nvim_tree.config.actions.open_file.window_picker
---
---(default: `true`)
---@field enable? boolean
---
---Change the default window picker or define your own.
---(default: `"default"`)
---@field picker? "default"|(fun(): integer)
---
---Identifier characters to use.
---(default: `"ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"`)
---@field chars? string
---
---[nvim_tree.config.actions.open_file.window_picker.exclude]
---@field exclude? nvim_tree.config.actions.open_file.window_picker.exclude
---Tables of buffer option names mapped to a list of option values. Windows containing matching buffers will not be:
--- - available when using a window picker
--- - selected when not using a window picker
---@class nvim_tree.config.actions.open_file.window_picker.exclude
---
---(default: `{ "notify", "lazy", "qf", "diff", "fugitive", "fugitiveblame", }`)
---@field filetype? string[]
---
---(default: `{ "nofile", "terminal", "help", }`)
---@field buftype? string[]
---Removing files.
---@class nvim_tree.config.actions.remove_file
---
---Close any window that displays a file when removing that file from the tree.
---(default: `true`)
---@field close_window? boolean