How can we help?

Compact Folders

By default the folder setup may not be ideal. Here is how you can change the folder setup.

Understanding Compact Folders in VS Code

VS Code's default folder view combines single-child folders into a compact display. While this can save space, it might make navigation less intuitive for some developers.
Β 
notion image

How to Disable Compact Folders Windows

  1. Open VS Code Settings (File > Preferences > Settings, or use Ctrl+,)
  1. Search for "explorer.compactFolders" in the settings search bar
  1. Uncheck the box next to "Explorer: Compact Folders"

How to Disable Compact Folders on Mac

  1. Open VS Code Settings (Code > Preferences > Settings, or use Cmd+,)
  1. Search for "explorer.compactFolders" in the settings search bar
  1. Uncheck the box next to "Explorer: Compact Folders"
The setting change will take effect immediately, showing the full folder structure.
Β 
notion image

Before and After

With Compact Folders (Default):
Without Compact Folders:

Benefits of Disabling Compact Folders

  • Better visualization of the complete folder structure
  • Easier to understand nested directory relationships
  • More familiar directory tree representation
  • Helpful for projects with deep nesting
This setting is particularly useful when working on large projects where understanding the exact folder hierarchy is important.