If child folder is empty, vscode get them merged like on screenshot. Is there an option to disable it? It's confusing and harder to use for me.
- 40It's a horrible defaultNickW– NickW2023-02-04 16:42:39 +00:00Commented Feb 4, 2023 at 16:42
- 1Java loves massive towers of nested folders, so if you frequently use Java (ugh), this might be a reasonable thing to turn on. But it's certainly a poor default.Lily Finley– Lily Finley2024-05-22 22:07:09 +00:00Commented May 22, 2024 at 22:07
5 Answers
Disable/uncheck Explorer: Compact Folders in your settings.
Related info from release notes: Is there a way to flatten or merge single-folder folders in vs code explorer?
Or directly in your settings.json, add "explorer.compactFolders": false.
To reach settings.json, use Ctrl+Shift+P to open the command palette, then type "settings.json" and hit enter (the item is called "Preferences: Open Settings(JSON)")
5 Comments
"explorer.compactFolders": false.Press the
ctrl+shift+pand type settings.json in the textbox then select Open User Settings (JSON), if you can't find User Settings pressctrl+,at the same time and select the top right icon with a tooltip ofOpen Settings (JSON)In that particular file, paste
"explorer.compactFolders": falseto disable merging file names
Comments
For the Explorer View, put the following in settings.json:
"explorer.compactFolders": false, For the SCM (Source Control) View, add "scm.compactFolders": false,.

