Ian
Ian

Reputation: 139

Why are sub-folders within the File Explorer in Visual Studio Code collapsing into a single line?

I am relatively new to VS Code and I think I must have accidentally changed a setting.

VS Code used to clearly display all sub-folders below and indented to the right from their parent folders, but something has changed and now my sub-folders display somewhat like breadcrumbs in the File Explorer (see image posted below).

Image of VS Code File Explorer with breadcrumb-style sub-folder display

I've tried looking through the Keyboard Shortcuts and 'Tips and Tricks' doc for VS Code as well as googling and searching through Stack Overflow, but can't seem to figure out what the command is to change this setting. Any thoughts on how to fix this would be really helpful.

Upvotes: 11

Views: 7381

Answers (1)

Jeremy
Jeremy

Reputation: 1298

This is a fairly newer change to VSCode that came on the November 2019 (version 1.41)

The setting you are looking for is "compact folders". You can get there by going to: File → Preferences → Settings → explorer.compactFolders and then unchecking the box.

From November 2019 (Version 1.41) release notes:

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.

Upvotes: 35

Related Questions