Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

indent_size overrides tab_size for tab characters #346

Open
1 of 2 tasks
RA80533 opened this issue Jan 25, 2023 · 2 comments
Open
1 of 2 tasks

indent_size overrides tab_size for tab characters #346

RA80533 opened this issue Jan 25, 2023 · 2 comments

Comments

@RA80533
Copy link

RA80533 commented Jan 25, 2023

Please fill-in this template.

  • I have a question that is specific to this extension; thus, inappropriate for the main EditorConfig issue tracker.
  • I tried running code --disable-extensions and the issue did NOT present itself.

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

  • Indentation is selected as "Spaces: 2"
  • Tab characters are rendered with a width of 4

Actual behavior

  • Indentation is selected as "Spaces: 2"
  • Tab characters are rendered with a width of 2

Additional comments or steps to reproduce

  • Open a file with tab characters using the above configuration
  • Observe the width of the tab characters
@moy
Copy link

moy commented Jul 21, 2023

Note that there is a recent fix in VSCode itself: microsoft/vscode#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.

yshui added a commit to yshui/editorconfig-vscode that referenced this issue Dec 1, 2023
yshui added a commit to yshui/editorconfig-vscode that referenced this issue Dec 1, 2023
yshui added a commit to yshui/editorconfig-vscode that referenced this issue Dec 1, 2023
@huyz
Copy link

huyz commented Apr 4, 2024

Related: #341

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants