nvim-tree.lua icon indicating copy to clipboard operation
nvim-tree.lua copied to clipboard

Partial Collapse

Open alex-courtis opened this issue 1 year ago • 4 comments

#2112

~~Method to recursively collapse a partial tree up to the root level folder.~~

~~As per collapse_all but within one sub-tree.~~

Recursively collapse a node. As per open.edit on an open node however also recursively collapses contents.

alex-courtis avatar Apr 10 '23 02:04 alex-courtis

I'm leaning towards collapse with the same param as collapse_all.

alex-courtis avatar Apr 10 '23 04:04 alex-courtis

... collapse a partial tree up to the root level folder

I want to make sure that we talked about the same behavior.

When I have this start condition:

image

If the cursor is on folder b/ or on file b/demo it should collapse any directory below b/ including b/ itself:

image

It could be an option (e.g. collapse({parents = true})) to also collapse all parents up to the root instead:

image

mikehaertl avatar Apr 10 '23 07:04 mikehaertl

If the cursor is on folder b/ or on file b/demo it should collapse any directory below b/ including b/ itself:

I see... that is the minimum required functionality. Updating description.

It could be an option (e.g. collapse({parents = true})) to also collapse all parents up to the root instead:

YAGNI. We can add it later if necessary.

alex-courtis avatar Apr 10 '23 21:04 alex-courtis

looking forward to it( image

jensenojs avatar Jun 21 '23 06:06 jensenojs