Skip to content

Commit 5880032

Browse files
committed
提供对齐调用参数新的可选值
1 parent fa5558b commit 5880032

File tree

5 files changed

+60
-0
lines changed

5 files changed

+60
-0
lines changed

Test/test_script/format_text/wait_format_by_option/.editorconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ continuation_indent_size = 8
109109
local_assign_continuation_align_to_first_expression = true
110110
[{align_call_args-eq-true.lua}]
111111
align_call_args = true
112+
[{align_call_args-eq-only_after_more_indention_statement.lua}]
113+
align_call_args = only_after_more_indention_statement
112114
[{align_function_define_params-eq-true.lua}]
113115
align_function_define_params = true
114116
[{keep_one_space_between_table_and_bracket-eq-true.lua}]
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
callllll(aaaaaaaa,
2+
bbbb,
3+
cccccccc,
4+
ddddddddd,
5+
eeeeeeee,
6+
ffffffff)
7+
8+
local f = fmt.format("aaaa"..
9+
"bbbbbbbbb"..
10+
"cccccc")
11+
12+
table.insert(t, function()
13+
14+
end)
15+
16+
table.insert(t, create(function ()
17+
end))
18+
19+
aaaaaaaaaaaaaa = calllll(aaa,bbbb,ccc,
20+
eeee,fheheh,heehe)
21+
22+
return fmt.format(okokok,
23+
bbbb,
24+
cccc,eee,fff)
25+

Test/test_script/format_text/wait_format_by_option_should_be/.editorconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ continuation_indent_size = 8
105105
local_assign_continuation_align_to_first_expression = true
106106
[{align_call_args-eq-true.lua}]
107107
align_call_args = true
108+
[{align_call_args-eq-only_after_more_indention_statement.lua}]
109+
align_call_args = only_after_more_indention_statement
108110
[{keep_one_space_between_call_args_and_parentheses-eq-true.lua}]
109111
keep_one_space_between_call_args_and_parentheses = true
110112
[{align_function_define_params-eq-true.lua}]
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
callllll(aaaaaaaa,
2+
bbbb,
3+
cccccccc,
4+
ddddddddd,
5+
eeeeeeee,
6+
ffffffff)
7+
8+
local f = fmt.format("aaaa" ..
9+
"bbbbbbbbb" ..
10+
"cccccc")
11+
12+
table.insert(t, function()
13+
14+
end)
15+
16+
table.insert(t, create(function()
17+
end))
18+
19+
aaaaaaaaaaaaaa = calllll(aaa, bbbb, ccc,
20+
eeee, fheheh, heehe)
21+
22+
return fmt.format(okokok,
23+
bbbb,
24+
cccc, eee, fff)

lua.template.editorconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# see https://github.com/CppCXY/EmmyLuaCodeStyle
33
[*.lua]
44
# [basic]
5+
56
# optional space/tab
67
indent_style = space
78
# if indent_style is space, this is valid
@@ -27,6 +28,7 @@ max_line_length = 120
2728
insert_final_newline = true
2829

2930
# [function]
31+
3032
# function call expression's args will align to first arg
3133
# optional true/false/only_after_more_indention_statement
3234
align_call_args = false
@@ -40,6 +42,7 @@ remove_expression_list_finish_comma = true
4042
call_arg_parentheses = keep
4143

4244
# [table]
45+
4346
# see document for detail
4447
continuous_assign_table_field_align_to_equal_sign = true
4548

@@ -50,6 +53,7 @@ keep_one_space_between_table_and_bracket = true
5053
align_table_field_to_first_field = false
5154

5255
# [statement]
56+
5357
align_chained_expression_statement = false
5458

5559
# continous line distance
@@ -66,6 +70,7 @@ if_condition_align_with_each_other = false
6670
local_assign_continuation_align_to_first_expression = false
6771

6872
# [indentation]
73+
6974
# if true, the label loses its current indentation
7075
label_no_indent = false
7176
# if true, there will be no indentation in the do statement
@@ -76,6 +81,7 @@ if_condition_no_continuation_indent = false
7681
if_branch_comments_after_block_no_indent = false
7782

7883
# [space]
84+
7985
# if true, t[#t+1] will not space wrapper '+'
8086
table_append_expression_no_space = false
8187

@@ -114,6 +120,7 @@ keep_line_after_function_define_statement = keepLine:1
114120
keep_line_after_expression_statement = keepLine
115121

116122
# [diagnostic]
123+
117124
# the following is code diagnostic options
118125
enable_check_codestyle = true
119126

0 commit comments

Comments
 (0)