This repository has been archived by the owner on May 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
Continuation indent size is overridden by regular indent size #57
Comments
+1 same here, took me 1 hour to figure out. |
+1 |
I found that the IDEA-specific setting |
I think that this issue is mostly fixed, however when using It would be nice if we could have something like this: |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
IDEA supports the concept of continuation indent. Its size is usually configured to twice as much as the regular indent size. Continuation indent can occur if e.g. you wrap the first line of an "if" or "for" or "try" statement in Java (and others like variable assignments, etc.). Continuation indent can also increase readability. Consider a line wrapped just before a block start in the case you use K&R style braces, and you don't wrap the lines around the parentheses. Then without a different indentation, it is hard to see whether the next line belongs to the block, or still to first line of the statement. And the EditorConfig plugin forces us to use the same indentation setting for continuation indentation as for regular indentation.
Example Java code without the EditorConfig support:
Example Java code with the EditorConfig support enabled:
I believe this is a bug of the plugin, and a decent fix may need a co-operation between the EditorConfig developers to add support for continuation indent (it is somewhat language specific though).
The text was updated successfully, but these errors were encountered: