Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 996
Alexander De Abreu Avatar asked Jan 18 '20 19:01

Alexander De Abreu


People also ask

How do you organize code in VS Code?

The code formatting is available in Visual Studio Code through the following shortcuts: On Windows Shift + Alt + F. On Mac Shift + Option + F. On Linux Ctrl + Shift + I.

What is the difference between folder and workspace VS Code?

A Visual Studio Code "workspace" is the collection of one or more folders that are opened in a VS Code window (instance).


1 Answers

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.

like image 158
Diogo Rocha Avatar answered Sep 19 '22 02:09

Diogo Rocha