You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
User settings set like so:
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.detectIndentation":true,
Open a C/C++ project with 4 space indentation.
Open a file in the project, observe on the status bar Spaces:2 (expected: Spaces: 4)
Click on the Spaces:2 setting in the status bar and select "Detect Indentation from Content".
Observe that the status bar now says Spaces: 4.
Switch to a different file with indentation of 4 spaces, it doesn't seem to matter.
Observe that the status bar now say Spaces: 2 (expected: Spaces: 4)
Switch back to the original file, observe that the status bar still stays Spaces: 2 (expected: spaces 4)
I've seen similar behavior with Makefiles and tabs, I manually switch to tab mode and every time I toggle back and forth from another file the tab mode is reset to spaces.
The text was updated successfully, but these errors were encountered:
@mschuckmann From what you are describing, it seems that "Detect Indentation from Content" does the right thing (i.e. guesses spaces@4 when the file contains mostly spaces@4), but it also appears that "Detect Indentation from Content" is not executing or is being overwritten.
The user settings can be overwritten by workspace settings (does the folder you open define .vscode settings?) and can be overwritten by extensions (do you perhaps have installed an extension that might do something with the indentation settings -- easiest is to check if the issue reproduces after closing all VSCode instances and running vscode --disable-extensions).
So running vscode with --disable-extensions does appear to fix the problem.
And it appears that the culprit was the EditorConfig for VS Studio extension.
Cool, just look in your system for an .editorconfig file somewhere in your parent directories or in your user folder, most likely settings are being picked up from there.
Steps to Reproduce:
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.detectIndentation":true,
I've seen similar behavior with Makefiles and tabs, I manually switch to tab mode and every time I toggle back and forth from another file the tab mode is reset to spaces.
The text was updated successfully, but these errors were encountered: