PlatformIO Community

How to change tab size into 4, instead of the standard 2 spaces?

Hello.

I’m new to PlatformIO and VSC for that matter, I really don’t like and I don’t understand why Arduino have chosen to change the size of tab from the universal 4 spaces into 2 spaces.
I like to change the tab size in PlatformIO, but if I go into settings in VSC I can change the tab size and it is set to 4, so where would I find that setting for PlatformIO?
Is there a preference.txt file such as in the Arduino IDE and if so where is it found?

Regards

Since it’s a space-based indent (rather than a tab based one)… you need to apply the changes after making them.

i.e. After changing this setting (click on it to change)…

… you then need to re-format your code (right click -> Format Document, or Format Document With... if VSCode is being stupid and listing multiple formatters)

image