Skip to content

Conversation

@Colengms
Copy link
Contributor

Fixes an issue with .editorconfig tab_size not being applied to VS Code's tab size when in "space" (soft tab) mode.

I ran into this with the EDG codebase. (host_envir.c/.h are much easier to look at now).

The new check seems simpler:

  • First, indent_style is applied, only if present, to VS Code's insertSpaces option.
  • Independently of that, indent_size is applied to VS Code's indentSize AND tabSize (as a fallback/default).
    • Or, if it's the special value tab, VS Code's indentSize option is set to its own special value of tabSize (telling VS Code to use the value of tabSize instead).
  • Then, also independent of the other two options, if tab_width is specified, it's applied to VS Code's tabSize option.

Based on information here:

@Colengms Colengms requested a review from a team as a code owner January 30, 2025 03:22
Copy link
Contributor

@fearthecowboy fearthecowboy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@Colengms Colengms merged commit 0a64b77 into main Jan 30, 2025
6 checks passed
@Colengms Colengms deleted the coleng/editorconfig_tabsize branch January 30, 2025 19:03
@sean-mcmanus sean-mcmanus added this to the 1.24.0 milestone Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants