In Editor -> Code Style -> Kotlin, why isn't...
# intellij
g
In Editor -> Code Style -> Kotlin, why isn't there an "Align when multiline" option for Chained Function Calls? There is "Wrap first call," which doesn't seem to do anything.
Copy code
foo.toUpperCase()
    .trim()
    .length
Then "Use continuation indent" which just indents one more unit:
Copy code
foo.toUpperCase()
        .trim()
        .length
Why not "Align when multiline" so the dots line up all pretty?
Copy code
foo.toUpperCase()
   .trim()
   .length
e
https://kotlinlang.org/docs/coding-conventions.html#formatting
Use four spaces for indentation. Do not use tabs.
As a general rule, avoid horizontal alignment of any kind. Renaming an identifier to a name with a different length should not affect the formatting of either the declaration or any of the usages.
g
"Renaming an identifier to a name with a different length should not affect the formatting"
That is a really good answer. Thank you. I still like what I'm used to, but I'm going to try retraining myself to follow the standard. https://kotlinlang.org/docs/coding-conventions.html#wrap-chained-calls