Option to use continuation indent in argument lists

This commit is contained in:
Dmitry Jemerov
2017-11-30 16:52:42 +01:00
parent 3038f87105
commit 3394d675e5
3 changed files with 9 additions and 1 deletions
@@ -41,6 +41,7 @@ public class KotlinCodeStyleSettings extends CustomCodeStyleSettings {
public int NAME_COUNT_TO_USE_STAR_IMPORT_FOR_MEMBERS = ApplicationManager.getApplication().isUnitTestMode() ? Integer.MAX_VALUE : 3;
public boolean IMPORT_NESTED_CLASSES = false;
public boolean CONTINUATION_INDENT_IN_PARAMETER_LISTS = true;
public boolean CONTINUATION_INDENT_IN_ARGUMENT_LISTS = true;
public boolean CONTINUATION_INDENT_FOR_EXPRESSION_BODIES = true;
public boolean CONTINUATION_INDENT_FOR_CHAINED_CALLS = true;
public boolean CONTINUATION_INDENT_IN_SUPERTYPE_LISTS = true;
@@ -175,7 +175,10 @@ abstract class KotlinCommonBlock(
return Indent.getNoneIndent()
}
return Indent.getContinuationWithoutFirstIndent()
return if (settings.kotlinCustomSettings.CONTINUATION_INDENT_IN_ARGUMENT_LISTS)
Indent.getContinuationWithoutFirstIndent()
else
Indent.getNormalIndent()
}
if (parentType === KtNodeTypes.TYPE_PARAMETER_LIST || parentType === KtNodeTypes.TYPE_ARGUMENT_LIST) {
@@ -273,6 +273,10 @@ class KotlinLanguageCodeStyleSettingsProvider : LanguageCodeStyleSettingsProvide
KotlinCodeStyleSettings::CONTINUATION_INDENT_IN_PARAMETER_LISTS,
"Use continuation indent",
CodeStyleSettingsCustomizable.WRAPPING_METHOD_PARAMETERS)
showCustomOption(
KotlinCodeStyleSettings::CONTINUATION_INDENT_IN_ARGUMENT_LISTS,
"Use continuation indent",
CodeStyleSettingsCustomizable.WRAPPING_METHOD_ARGUMENTS_WRAPPING)
showCustomOption(
KotlinCodeStyleSettings::CONTINUATION_INDENT_FOR_CHAINED_CALLS,
"Use continuation indent",