Skip to content

Commit d243da3

Browse files
committed
doc: collapse_all
1 parent a731a81 commit d243da3

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

doc/nvim-tree-lua.txt

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -337,20 +337,20 @@ See |nvim-tree-highlight| for details.
337337

338338
*:NvimTreeCollapse*
339339

340-
Collapses the nvim-tree recursively.
340+
Collapses the entire tree recursively.
341341

342342
See |nvim-tree-api.tree.collapse_all()|
343343

344-
Calls: `api.tree.collapse_all(false)`
344+
Calls: `api.tree.collapse_all(nil, { keep_buffers = false })`
345345

346346
*:NvimTreeCollapseKeepBuffers*
347347

348-
Collapses the nvim-tree recursively, but keep the directories open, which are
349-
used in an open buffer.
348+
Collapses the entire tree recursively, but keep the directories open, which
349+
are used in an open buffer.
350350

351351
See |nvim-tree-api.tree.collapse_all()|
352352

353-
Calls: `api.tree.collapse_all(true)`
353+
Calls: `api.tree.collapse_all(nil, { keep_buffers = true })`
354354

355355
*:NvimTreeHiTest*
356356

@@ -1829,11 +1829,15 @@ tree.find_file({opts}) *nvim-tree-api.tree.find_file()*
18291829
tree.search_node() *nvim-tree-api.tree.search_node()*
18301830
Open the search dialogue as per the search_node action.
18311831

1832-
tree.collapse_all({keep_buffers}) *nvim-tree-api.tree.collapse_all()*
1833-
Collapse the tree.
1832+
tree.collapse_all({node}, {opts}) *nvim-tree-api.tree.collapse_all()*
1833+
Collapses the tree recursively.
18341834

18351835
Parameters: ~
1836-
• {keep_buffers} (boolean) do not collapse nodes with open buffers.
1836+
{node} (Node|nil) collapse only children of this directory
1837+
{opts} (table) optional parameters
1838+
1839+
Options: ~
1840+
• {keep_buffers} (boolean?) do not collapse nodes with open buffers, default false
18371841

18381842
tree.expand_all({node}) *nvim-tree-api.tree.expand_all()*
18391843
Recursively expand all nodes under the tree root or specified folder.

0 commit comments

Comments
 (0)