Indent () in if, when, while and do-while with continuation indent (KT-5897)

#KT-5897 Fixed
This commit is contained in:
Nikolay Krasko
2016-12-06 20:10:47 +03:00
parent 211cae2ad2
commit 300601da54
5 changed files with 34 additions and 0 deletions
@@ -368,6 +368,11 @@ private val INDENT_RULES = arrayOf<NodeIndentStrategy>(
.`in`(KtNodeTypes.PARENTHESIZED)
.set(Indent.getContinuationWithoutFirstIndent(false)),
strategy("Round Brackets around conditions")
.forType(LPAR, RPAR)
.`in`(KtNodeTypes.IF, KtNodeTypes.WHEN_ENTRY, KtNodeTypes.WHILE, KtNodeTypes.DO_WHILE)
.set(Indent.getContinuationWithoutFirstIndent(true)),
strategy("KDoc comment indent")
.`in`(KDOC_CONTENT)
.forType(KDocTokens.LEADING_ASTERISK, KDocTokens.END)