'VSCode folder structure

enter image description here

I want to change the folder structure.. if you see in the folder "utils" i have another folder called "mocks" well.. what i want is change the structure to see 1 folder by folder.. something like this

enter image description here

Like the "services" folder which have just a 1 file.. i have the same structure, 1 folder inside another and 1 file but in the structure i see 1 folder in the same line. I don't know if i explained me



Solution 1:[1]

This is a setting: explorer.compactFolders.

More info here: Compact folders in Explorer.

In the File Explorer, we now render single child folders in a compact form. In such a form, single child folders will be compressed in a combined tree element. Useful for Java package structures, for example.

Setting explorer.compactFolders controls this behavior. By default, this setting is turned on.

Solution 2:[2]

In VS Code we have a Setting called Compact File Structure.

If that setting is On then we Compact the structure.

How to turn it off?

  1. Go to settings
  2. Search for: Compact File
  3. Uncheck The compact file structure
  4. Save the file

Done.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Community
Solution 2 Simeon Pilgrim