editorconfig / editorconfig-vscode

EditorConfig extension for Visual Studio Code
http://editorconfig.org/
MIT License
1.23k stars 118 forks source link

`indent_size` overrides `tab_size` for tab characters #346

Open RA80533 opened 1 year ago

RA80533 commented 1 year ago

Please fill-in this template.

Issue

Visual Studio Code editorconfig-vscode
Version 1.75.0-insider v0.16.4

Root .editorconfig File

root = true

[*]
tab_size = 4

[*.json]
indent_style = space
indent_size = 2

Are there any other relevant .editorconfig files in your project? No

Visual Studio Code Setting Default User Workspace
editor.insertSpaces true ____ ____
editor.tabSize 4 _ _
editor.trimAutoWhitespace true false ____
files.autoSave "off" "___" "___"
files.insertFinalNewline false true _____
files.trimTrailingWhitespace false _____ _____

File opened

./devcontainer.json

Expected behavior

Actual behavior

Additional comments or steps to reproduce

moy commented 1 year ago

Note that there is a recent fix in VSCode itself: https://github.com/microsoft/vscode/pull/155450

Before this, VSCode was not able to distinguish tab and indent size, but it is now possible. indent_size should now be mapped to editor.indentSize in VSCode.

huyz commented 5 months ago

Related: https://github.com/editorconfig/editorconfig-vscode/issues/341