nvim-tree / nvim-tree.lua

A file explorer tree for neovim written in lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ungroup empty folders

juefeiyan opened this issue · comments

commented

Is this a question?
no

Can this functionality be implemented utilising API?
no

Is your feature request related to a problem? Please describe.
sometimes I need to add files in the middle folder, for example, if the main class of my java project is in
com/a/b/c/app/Main.java, I might need to add a folder under
com/a/b/c/config, for now, I am not able to do it.

Describe the solution you'd like

  1. When a user expand_or_collapse a folder, it will first group the empty folders and show the files in the last folder
  2. When a user expand_or_collapse a grouped open folder, it will ungroup all empty folders, but the status of all folders is still 'open'
  3. When a user expand_or_collapse an ungrouped open folder, it will close all folders and files, and the status will be back to step 1

Describe alternatives you've considered
nothing

Additional context
Add any other context or screenshots about the feature request here.

commented

Can anyone assign this task to me? I am happy to implement this future as my first PR on the GitHub

If I undrestood you correctly, you can do it by changing path input
image
image

commented

thanks, I used this way before, but sometimes the path is complicated and long, it is painful if I need to figure out the correct path