Kotlin Class Headers Indentation
Answered
According to official Kotlin coding conventions in this page https://kotlinlang.org/docs/reference/coding-conventions.html, when we have long class headers we are suggested to place constructor parameters in different lines with indentation. Although the guideline does not explicitly says 4 spaces, but it can be interpret that way. However, in the latest version of IntelliJ Idea as well as Android Studio, those parameters are indented with 8 spaces.
The following screenshot is what I intended to have.

But after running auto-format, the parameters are re-indented as follow.

Is there anyway to fix that? Thank in advance.
Visutr.
Please sign in to leave a comment.
Please use https://discuss.kotlinlang.org/ for any questions related to Kotlin.