When I open a file in VS Code and press Alt + Shift + F, the opened file gets formatted. The 2 spaces indentation gets used in html, js, etc. even though my configurations specify 4 spaces. How could I fix it?
I can refer the same issue in Visual Studio. Relevent changes for each type of file extesion exist in different section with the same heading. For example C# and JavaScript/TypeScript has the same settings. So make sure you are modifying correct one.
Sign up to request clarification or add additional context in comments.
Comments
0
In my case, I had somehow togged a setting (Edit -> Advanced -> Set Indentation) to be 'Spaces' and not 'Tabs'. When I set it to Tabs, the editor changed my indentation back to 4 spaces and tabs.