@@ -10,95 +10,114 @@ indent_size = 4
1010tab_width = 4
1111# none/single/double
1212quote_style = none
13- # keep/remove/remove_table_only/remove_string_only/unambiguous_remove_string_only
14- call_arg_parentheses = keep
13+
1514# only support number
1615continuation_indent_size = 4
17- # if true, continuation_indent_size for local or assign statement is invalid
18- # however, if the expression list has cross row expression, it will not be aligned to the first expression
19- local_assign_continuation_align_to_first_expression = false
2016
21- # if true, ormat like this "local t <const> = 1"
22- keep_one_space_between_namedef_and_attribute = true
17+ # optional crlf/lf/cr/auto, if it is 'auto', in windows it is crlf other platforms are lf
18+ end_of_line = auto
19+
20+ detect_end_of_line = false
21+
22+ # this mean utf8 length , if this is 'unset' then the line width is no longer checked
23+ # this option decides when to chopdown the code
24+ max_line_length = 120
25+
26+ # this will check text end with new line(format always end with new line)
27+ insert_final_newline = true
2328
2429# [function]
2530# function call expression's args will align to first arg
2631# optional true/false/only_after_more_indention_statement
2732align_call_args = false
2833
29-
3034# if true, all function define params will align to first param
3135align_function_define_params = true
3236
37+ remove_expression_list_finish_comma = true
38+
39+ # keep/remove/remove_table_only/remove_string_only/unambiguous_remove_string_only
40+ call_arg_parentheses = keep
41+
3342# [table]
3443# see document for detail
3544continuous_assign_table_field_align_to_equal_sign = true
3645
37- # [statement]
38- align_chained_expression_statement = false
3946# if true, format like this "local t = { 1, 2, 3 }"
4047keep_one_space_between_table_and_bracket = true
48+
4149# if indent_style is tab, this option is invalid
4250align_table_field_to_first_field = false
51+
52+ # [statement]
53+ align_chained_expression_statement = false
54+
4355# continous line distance
4456max_continuous_line_distance = 1
57+
4558# see document for detail
4659continuous_assign_statement_align_to_equal_sign = true
4760
61+ # if statement will align like switch case
62+ if_condition_align_with_each_other = false
63+
64+ # if true, continuation_indent_size for local or assign statement is invalid
65+ # however, if the expression list has cross row expression, it will not be aligned to the first expression
66+ local_assign_continuation_align_to_first_expression = false
67+
68+ # [indentation]
4869# if true, the label loses its current indentation
4970label_no_indent = false
5071# if true, there will be no indentation in the do statement
5172do_statement_no_indent = false
5273# if true, the conditional expression of the if statement will not be a continuation line indent
5374if_condition_no_continuation_indent = false
54- #
75+
5576if_branch_comments_after_block_no_indent = false
77+
78+ # [space]
5679# if true, t[#t+1] will not space wrapper '+'
5780table_append_expression_no_space = false
58- # if statement will align like switch case
59- if_condition_align_with_each_other = false
6081
6182long_chain_expression_allow_one_space_after_colon = false
6283
6384remove_empty_header_and_footer_lines_in_function = true
6485
65- remove_expression_list_finish_comma = true
66- # optional crlf/lf/cr/auto, if it is 'auto', in windows it is crlf other platforms are lf
67- end_of_line = auto
68- #
69- detect_end_of_line = false
70-
7186space_before_function_open_parenthesis = false
7287
7388space_before_open_square_bracket = false
7489
75- # this mean utf8 length , if this is 'unset' then the line width is no longer checked
76- max_line_length = 120
90+ # if true, ormat like this "local t <const> = 1"
91+ keep_one_space_between_namedef_and_attribute = true
7792
78- # [line layout ]
93+ # [row_layout ]
7994# The following configuration supports four expressions
8095# minLine:${n}
8196# keepLine
8297# keepLine:${n}
8398# maxLine:${n}
8499
85100keep_line_after_if_statement = minLine:0
101+
86102keep_line_after_do_statement = minLine:0
103+
87104keep_line_after_while_statement = minLine:0
105+
88106keep_line_after_repeat_statement = minLine:0
107+
89108keep_line_after_for_statement = minLine:0
109+
90110keep_line_after_local_or_assign_statement = keepLine
111+
91112keep_line_after_function_define_statement = keepLine:1
113+
92114keep_line_after_expression_statement = keepLine
93115
94116# [diagnostic]
95117# the following is code diagnostic options
96118enable_check_codestyle = true
97119
98- # this will check text end with new line(format always end with new line)
99- insert_final_newline = true
100-
101- # [name style check]
120+ # [diagnostic.name_style]
102121enable_name_style_check = false
103122# the following is name style check rule
104123# base option off/camel_case/snake_case/upper_snake_case/pascal_case/same(filename/first_param/'<const string>', snake_case/pascal_case/camel_case)
@@ -108,11 +127,19 @@ enable_name_style_check = false
108127# same(first_param, snake_case)
109128# same('m')
110129local_name_define_style = snake_case
130+
111131function_param_name_style = snake_case
132+
112133function_name_define_style = snake_case
134+
113135local_function_name_define_style = snake_case
136+
114137table_field_name_define_style = snake_case
138+
115139global_variable_name_define_style = snake_case|upper_snake_case
140+
116141module_name_define_style = same('m')|same(filename, snake_case)
142+
117143require_module_name_style = same(first_param, snake_case)
144+
118145class_name_define_style = same(filename, snake_case)
0 commit comments