Blank EditorConfig still forces tab width to 4 and spaces to 2
Please fill-in this template.
- [x] I have a question that is specific to this extension; thus, inappropriate for the main EditorConfig issue tracker.
- [x] I tried running
code --disable-extensionsand the issue did NOT present itself.
Issue
If I have no editorconfig, and I have the following in my user settings.json
{
"editor.tabSize": 2
}
then any tab-formatted file I open will reset the tab size to 4 and format using spaces

If I disable the extension and reopen the file, it behaves as expected.

I've tried this with detect indentation on and off, no difference.
If I create a .editorconfig file with indent_size line, it now behaves as expected. So there appears to be an issue with a blank config where something gets initialized with a bad default value.
I encountered the same issue after the VSCode November 2022 update.
Downgrading VSCode back to the October 2022 version (1.73.1) fixed the issue. Apparently, there have been some changes in the indent and tab size settings in VSCode
Related issues:
- https://github.com/microsoft/vscode/issues/42740
- https://github.com/microsoft/vscode/issues/10339
- https://github.com/microsoft/vscode/issues/5394
- https://github.com/microsoft/vscode/issues/135058
I have the same problem.
vscode has been updated to separate tabSize and indentSize,
but editorconfig-vscode applies the indent_size option in .editorconfig only to vscode's tabSize,
and indentSize is This seems to be due to the fact that it has not been changed.
In the actual code, only the tabSize is generated here,
https://github.com/editorconfig/editorconfig-vscode/blob/b86ebd4e9062c76e7145bcefc1a17cf2e6cc1acc/src/api.ts#L160-L172
and the vscode setting is changed here.
https://github.com/editorconfig/editorconfig-vscode/blob/b86ebd4e9062c76e7145bcefc1a17cf2e6cc1acc/src/api.ts#L54
Also, I added the indentSize property in the debugger on this line and run it, and it was set as expected.
However, there is no indentSize in the TextEditorOptions type to actually change the code.
See https://github.com/editorconfig/editorconfig-vscode/pull/358 for WIP fix