Skip to content

Support ij_kotlin_indent_size in editorconfig#2

Merged
Goooler merged 3 commits intosupport-ij-kotlin-indent-sizefrom
copilot/support-ij-kotlin-indent-size
Mar 10, 2026
Merged

Support ij_kotlin_indent_size in editorconfig#2
Goooler merged 3 commits intosupport-ij-kotlin-indent-sizefrom
copilot/support-ij-kotlin-indent-size

Conversation

Copy link

Copilot AI commented Mar 8, 2026

ij_kotlin_indent_size is an IntelliJ-specific Kotlin language override for indent_size, but ktfmt ignored it entirely. Users who configure indentation via ij_kotlin_indent_size saw no effect on ktfmt formatting.

Changes

  • EditorConfigResolver: Register ij_kotlin_indent_size as a recognized property and use it as the highest-priority source for blockIndent, falling back to indent_sizetab_width as before:
    ij_kotlin_indent_size  (new, highest priority)
      → indent_size
      → tab_width (when indent_size = tab)
    
  • EditorConfigResolverTest: Two new tests — ij_kotlin_indent_size sets blockIndent, and takes priority over indent_size when both are present.
  • docs/editorconfig/: Added ij_kotlin_indent_size to all three example .editorconfig files alongside the existing indent_size.

Co-authored-by: Goooler <10363352+Goooler@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for ij_kotlin_indent_size in editorconfig Support ij_kotlin_indent_size in editorconfig Mar 8, 2026
@Goooler Goooler marked this pull request as ready for review March 8, 2026 10:20
@Goooler Goooler changed the base branch from main to support-ij-kotlin-indent-size March 10, 2026 02:31
@Goooler Goooler merged commit 9cf5719 into support-ij-kotlin-indent-size Mar 10, 2026
4 checks passed
@Goooler Goooler deleted the copilot/support-ij-kotlin-indent-size branch March 10, 2026 02:38
@Goooler
Copy link
Owner

Goooler commented Mar 10, 2026

Addressed to facebook#604.

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

Successfully merging this pull request may close these issues.

2 participants