stevearc / oil.nvim

Neovim file explorer: edit your filesystem like a buffer
MIT License
3.83k stars 109 forks source link

feature request: collapse directories with a single child into a single entry #408

Closed moliva closed 3 months ago

moliva commented 3 months ago

Did you check existing requests?

Describe the feature

Show a list of directories with a single child directory as a single entry.

This is something that other editors (particularly used for Java development) do, but can also be found in GitHub, for example:

Screenshot 2024-06-08 at 3 33 06 PM

You can see above how resession/extensions are collapsed into a single entry as resession has no other child apart from sessions.

This could also go further and collapse multiple levels of directories into a single entry.

Provide background

Working on environments where the directory structure translates to the package structure of the language, this is a very common use case. As mentioned before, an example of this scenario is developing Java code. In these cases, a flat representation of this structure whenever this happens proves to be very helpful and improves the experience when exploring the code.

What is the significance of this feature?

strongly desired

Additional details

No response

stevearc commented 3 months ago

Duplicate of #311. This feature is still not a good fit for oil for the reasons listed in that issue.

moliva commented 3 months ago

Oops, missed that one! Understood! 👍🏻