@@ -42,120 +42,133 @@ function nvim_tree.api.node.buffer.wipe(node, opts) end
4242--- Collapse the tree under a directory or a file's parent directory.
4343---
4444--- @param node ? nvim_tree.api.Node directory or file
45- --- @param opts ? nvim_tree.api.tree .collapse.Opts optional
45+ --- @param opts ? nvim_tree.api.node .collapse.Opts optional
4646function nvim_tree .api .node .collapse (node , opts ) end
4747
48+ --- @class nvim_tree.api.node.collapse.Opts
49+ --- @inlinedoc
50+ ---
51+ --- Do not collapse nodes with open buffers.
52+ --- (default: false)
53+ --- @field keep_buffers ? boolean
54+
4855---
4956--- Recursively expand all nodes under a directory or a file's parent directory.
5057---
5158--- @param node ? nvim_tree.api.Node directory or file
52- --- @param opts ? nvim_tree.api.tree .expand.Opts optional
59+ --- @param opts ? nvim_tree.api.node .expand.Opts optional
5360function nvim_tree .api .node .expand (node , opts ) end
5461
62+ --- @class nvim_tree.api.node.expand.Opts
63+ --- @inlinedoc
5564---
65+ --- Return `true` if `node` should be expanded. `expansion_count` is the total number of folders expanded.
66+ --- @field expand_until ? fun ( expansion_count : integer , node : Node ): boolean
67+
5668---
69+ --- Navigate to the next item showing diagnostic status.
5770---
5871--- @param node ? nvim_tree.api.Node directory or file
5972function nvim_tree .api .node .navigate .diagnostics .next (node ) end
6073
6174---
62- ---
75+ --- Navigate to the next item showing diagnostic status, recursively. Needs [nvim_tree.Config.Diagnostics] {show_on_dirs}
6376---
6477--- @param node ? nvim_tree.api.Node directory or file
6578function nvim_tree .api .node .navigate .diagnostics .next_recursive (node ) end
6679
6780---
68- ---
81+ --- Navigate to the previous item showing diagnostic status.
6982---
7083--- @param node ? nvim_tree.api.Node directory or file
7184function nvim_tree .api .node .navigate .diagnostics .prev (node ) end
7285
7386---
74- ---
87+ --- Navigate to the previous item showing diagnostic status, recursively. Needs [nvim_tree.Config.Diagnostics] {show_on_dirs}
7588---
7689--- @param node ? nvim_tree.api.Node directory or file
7790function nvim_tree .api .node .navigate .diagnostics .prev_recursive (node ) end
7891
7992---
80- ---
93+ --- Navigate to the next item showing git status.
8194---
8295--- @param node ? nvim_tree.api.Node directory or file
8396function nvim_tree .api .node .navigate .git .next (node ) end
8497
8598---
86- ---
99+ --- Navigate to the next item showing git status, recursively. Needs [nvim_tree.Config.Git] {show_on_dirs}
87100---
88101--- @param node ? nvim_tree.api.Node directory or file
89102function nvim_tree .api .node .navigate .git .next_recursive (node ) end
90103
91104---
92- ---
105+ --- Navigate to the next item showing git status, skipping `.gitignore`
93106---
94107--- @param node ? nvim_tree.api.Node directory or file
95108function nvim_tree .api .node .navigate .git .next_skip_gitignored (node ) end
96109
97110---
98- ---
111+ --- Navigate to the previous item showing git status.
99112---
100113--- @param node ? nvim_tree.api.Node directory or file
101114function nvim_tree .api .node .navigate .git .prev (node ) end
102115
103116---
104- ---
117+ --- Navigate to the previous item showing git status, recursively. Needs [nvim_tree.Config.Git] {show_on_dirs}
105118---
106119--- @param node ? nvim_tree.api.Node directory or file
107120function nvim_tree .api .node .navigate .git .prev_recursive (node ) end
108121
109122---
110- ---
123+ --- Navigate to the previous item showing git status, skipping `.gitignore`
111124---
112125--- @param node ? nvim_tree.api.Node directory or file
113126function nvim_tree .api .node .navigate .git .prev_skip_gitignored (node ) end
114127
115128---
116- ---
129+ --- Navigate to the next [bufloaded()] file.
117130---
118131--- @param node ? nvim_tree.api.Node directory or file
119132function nvim_tree .api .node .navigate .opened .next (node ) end
120133
121134---
122- ---
135+ --- Navigate to the previous [bufloaded()] file.
123136---
124137--- @param node ? nvim_tree.api.Node directory or file
125138function nvim_tree .api .node .navigate .opened .prev (node ) end
126139
127140---
128- ---
141+ --- Navigate to the parent directory of the node.
129142---
130143--- @param node ? nvim_tree.api.Node directory or file
131144function nvim_tree .api .node .navigate .parent (node ) end
132145
133146---
134- ---
147+ --- Navigate to the parent directory of the node, closing it.
135148---
136149--- @param node ? nvim_tree.api.Node directory or file
137150function nvim_tree .api .node .navigate .parent_close (node ) end
138151
139152---
140- ---
153+ --- Navigate to the first node in the current node's folder.
141154---
142155--- @param node ? nvim_tree.api.Node directory or file
143156function nvim_tree .api .node .navigate .sibling .first (node ) end
144157
145158---
146- ---
159+ --- Navigate to the last node in the current node's folder.
147160---
148161--- @param node ? nvim_tree.api.Node directory or file
149162function nvim_tree .api .node .navigate .sibling .last (node ) end
150163
151164---
152- ---
165+ --- Navigate to the next node in the current node's folder, wraps.
153166---
154167--- @param node ? nvim_tree.api.Node directory or file
155168function nvim_tree .api .node .navigate .sibling .next (node ) end
156169
157170---
158- ---
171+ --- Navigate to the previous node in the current node's folder, wraps.
159172---
160173--- @param node ? nvim_tree.api.Node directory or file
161174function nvim_tree .api .node .navigate .sibling .prev (node ) end
0 commit comments