Support ij_kotlin_continuation_indent_size in editorconfig#600
Closed
Goooler wants to merge 1 commit intofacebook:mainfrom
Closed
Support ij_kotlin_continuation_indent_size in editorconfig#600Goooler wants to merge 1 commit intofacebook:mainfrom
ij_kotlin_continuation_indent_size in editorconfig#600Goooler wants to merge 1 commit intofacebook:mainfrom
Conversation
ktfmt only recognized the generic `ij_continuation_indent_size` editorconfig property, ignoring the Kotlin-specific `ij_kotlin_continuation_indent_size` that IntelliJ IDEA actually writes for Kotlin files. ## Changes - **`EditorConfigResolver`**: Add `ij_kotlin_continuation_indent_size` as a recognized property type; resolve it with precedence over `ij_continuation_indent_size`. Uses `Property.isValid()` + `getValueAs()` directly so invalid values fall through to the generic property rather than short-circuiting to the default. - **Tests**: Cover standalone `ij_kotlin_continuation_indent_size` usage and precedence over `ij_continuation_indent_size`. - **Example editorconfig files**: Add `ij_kotlin_continuation_indent_size` alongside `ij_continuation_indent_size` in all bundled style templates. ### Precedence ``` ij_kotlin_continuation_indent_size (highest — Kotlin-specific) ↓ fallback if absent or invalid ij_continuation_indent_size ↓ fallback if absent baseOptions.continuationIndent ``` --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Goooler <10363352+Goooler@users.noreply.github.com> Co-authored-by: Goooler <wangzongler@gmail.com>
Contributor
Author
|
Follow up #570. |
hick209
approved these changes
Mar 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ktfmt only recognized the generic
ij_continuation_indent_sizeeditorconfig property, ignoring the Kotlin-specificij_kotlin_continuation_indent_sizethat IntelliJ IDEA actually writes for Kotlin files.Changes
EditorConfigResolver: Addij_kotlin_continuation_indent_sizeas a recognized property type; resolve it with precedence overij_continuation_indent_size. UsesProperty.isValid()+getValueAs()directly so invalid values fall through to the generic property rather than short-circuiting to the default.ij_kotlin_continuation_indent_sizeusage and precedence overij_continuation_indent_size.ij_kotlin_continuation_indent_sizealongsideij_continuation_indent_sizein all bundled style templates.Precedence