File tree Expand file tree Collapse file tree 4 files changed +10
-4
lines changed
Expand file tree Collapse file tree 4 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -276,6 +276,10 @@ void LuaEditorConfig::ParseFromSection(std::shared_ptr<LuaCodeStyleOptions> opti
276276 {
277277 options->align_call_args = AlignCallArgs::OnlyAfterMoreIndentionStatement;
278278 }
279+ else if (value == " only_not_exist_cross_row_expression" )
280+ {
281+ options->align_call_args = AlignCallArgs::OnlyNotExistCrossExpression;
282+ }
279283 }
280284
281285 if (configMap.count (" align_chained_expression_statement" ))
Original file line number Diff line number Diff line change @@ -1261,8 +1261,9 @@ std::shared_ptr<FormatElement> LuaFormatter::FormatCallArgList(std::shared_ptr<L
12611261 if (!expression->GetChildren ().empty ())
12621262 {
12631263 auto first = expression->GetChildren ().front ();
1264- if (first->GetType () == LuaAstNodeType::ClosureExpression || first->GetType () ==
1265- LuaAstNodeType::TableExpression)
1264+ if (first->GetType () == LuaAstNodeType::ClosureExpression
1265+ || first->GetType () == LuaAstNodeType::TableExpression
1266+ || _options.align_call_args == AlignCallArgs::OnlyNotExistCrossExpression)
12661267 {
12671268 canAligned = false ;
12681269 break ;
Original file line number Diff line number Diff line change @@ -26,5 +26,6 @@ enum class AlignCallArgs
2626{
2727 True ,
2828 False ,
29- OnlyAfterMoreIndentionStatement
29+ OnlyAfterMoreIndentionStatement ,
30+ OnlyNotExistCrossExpression ,
3031};
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ insert_final_newline = true
3030# [function]
3131
3232# function call expression's args will align to first arg
33- # optional true/false/only_after_more_indention_statement
33+ # optional true/false/only_after_more_indention_statement/only_not_exist_cross_row_expression
3434align_call_args = false
3535
3636# if true, all function define params will align to first param
You can’t perform that action at this time.
0 commit comments