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

Fix an issue with editorconfig tab_size #13216

Merged
merged 1 commit into from
Jan 30, 2025
Merged

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
Member

@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
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.

2 participants