Description
Can this functionality be implemented utilising API?
To some degree, see my PR.
Is your feature request related to a problem? Please describe.
I'm always frustrated when I work with java/scala projects. In these languages directory structure should reflect the namespace hierarchy which usually results in multiple nested directories with only a single child directory.
E.g. a namespace com.example.something
will have the following directory structure:
modules/src
└── main
└── com
└── example
└── something
├── bar.txt
└── foo.txt
Describe alternatives you've considered
I have two options if I want to explore this structure and get to the bottom of it:
- expand nodes manually one by one until I reach the bottom
- use
expand_all
function but this has following downsides:- when I don't know the directory structure it might result in a lot of nodes being opened unnecessarily, which I will have to close later
- when I do know the directory structure and I know that there are some additional directories I might still use
expand_all
knowing that I will have to close some of them
- use
group_empty
feature. I prefer to have a tree like structure. One reason for that is that it is more horizontally compact that the same structure rendered withgroup_empty
enabled.
Describe the solution you'd like
I would like to have an option that allows me to recursively expand all directories as long as there is only one children that is also a directory. If a directory that has more children is encountered the expansion should be stopped (after expanding that directory).
This can be implemented in more generic way - expand until a certain, user provided, condition is met.