Indent for multideclarations
This commit is contained in:
@@ -335,7 +335,7 @@ public class JetBlock extends AbstractBlock {
|
||||
.set(Indent.getNormalIndent()),
|
||||
|
||||
strategy("Indent for parts")
|
||||
.in(PROPERTY, FUN)
|
||||
.in(PROPERTY, FUN, MULTI_VARIABLE_DECLARATION)
|
||||
.notForType(BLOCK, FUN_KEYWORD, VAL_KEYWORD, VAR_KEYWORD)
|
||||
.set(Indent.getContinuationWithoutFirstIndent()),
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
fun test() {
|
||||
val (a, b) =
|
||||
Pair(true, false)
|
||||
|
||||
val (c, d)
|
||||
= Pair(true, false)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fun test() {
|
||||
val (a, b) =
|
||||
Pair(true, false)
|
||||
|
||||
val (c, d)
|
||||
= Pair(true, false)
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
fun test() {
|
||||
val (a, b) =
|
||||
<caret>
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fun test() {
|
||||
val (a, b) = <caret>
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
fun test() {
|
||||
val (a, b)
|
||||
<caret>
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fun test() {
|
||||
val (a, b) <caret>
|
||||
}
|
||||
@@ -214,6 +214,11 @@ public class JetFormatterTestGenerated extends AbstractJetFormatterTest {
|
||||
doTest("idea/testData/formatter/LoopParameterWithExplicitType.after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Multideclaration.after.kt")
|
||||
public void testMultideclaration() throws Exception {
|
||||
doTest("idea/testData/formatter/Multideclaration.after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("MultilineFunctionLiteral.after.kt")
|
||||
public void testMultilineFunctionLiteral() throws Exception {
|
||||
doTest("idea/testData/formatter/MultilineFunctionLiteral.after.kt");
|
||||
|
||||
@@ -204,6 +204,16 @@ public class JetTypingIndentationTestBaseGenerated extends AbstractJetTypingInde
|
||||
doNewlineTest("idea/testData/indentationOnNewline/InMultilineLambdaAfterArrow.after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("MultideclarationAfterEq.after.kt")
|
||||
public void testMultideclarationAfterEq() throws Exception {
|
||||
doNewlineTest("idea/testData/indentationOnNewline/MultideclarationAfterEq.after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("MultideclarationBeforeEq.after.kt")
|
||||
public void testMultideclarationBeforeEq() throws Exception {
|
||||
doNewlineTest("idea/testData/indentationOnNewline/MultideclarationBeforeEq.after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("NotFirstParameter.after.kt")
|
||||
public void testNotFirstParameter() throws Exception {
|
||||
doNewlineTest("idea/testData/indentationOnNewline/NotFirstParameter.after.kt");
|
||||
|
||||
Reference in New Issue
Block a user