Is there a way to collapse only files in VS Code’s explorer?

89 Views Asked by At

I work on a large project where large portions of the files are not in “leaf nodes”. There are many directories with subdirectories and a large number of files as well. This poor organization has made navigating the file tree an onerous exercise to say the least.

I’m wondering whether there is a convenient solution, native or in an extension, that allows the VS Code explorer sidebar to by default not show all the files in a directory that either has subdirectories in it or has them open. Instead it could have an item called Files which could be separately expanded/collapsed as if it were a subdirectory.

The program WinDirStat uses this approach by default, here is an image for reference. Notice how there is a section labeled “Files” to reduce clutter.

WinDirStat GUI

If this doesn’t exist as a setting or an extension, I suppose that’s not a bad idea for a project.

0

There are 0 best solutions below