|
1 | 1 |
|
2 | 2 | # see https://github.com/CppCXY/EmmyLuaCodeStyle |
3 | | -[*.lua] |
4 | | -# [basic code reformat option] |
5 | | -# optional space/tab |
6 | | -indent_style = space |
7 | | -# if indent_style is space, this is valid |
8 | | -indent_size = 4 |
9 | | -# if indent_style is tab, this is valid |
10 | | -tab_width = 4 |
11 | | -# only support number |
12 | | -continuation_indent_size = 4 |
13 | | -# if true, continuation_indent_size for local or assign statement is invalid |
14 | | -# however, if the expression list has cross row expression, it will not be aligned to the first expression |
15 | | -local_assign_continuation_align_to_first_expression = false |
16 | | -# function call expression's args will align to first arg |
17 | | -# however, if the args has cross row arg, it will not be aligned to the first arg |
18 | | -align_call_args = false |
19 | | -# if true, format like this "print( "123", 456 )" |
20 | | -keep_one_space_between_call_args_and_parentheses = false |
21 | | -# if true, all function define params will align to first param |
22 | | -align_function_define_params = true |
23 | | -# if true, format like this "local t = { 1, 2, 3 }" |
24 | | -keep_one_space_between_table_and_bracket = true |
25 | | -# if indent_style is tab, this option is invalid |
26 | | -align_table_field_to_first_field = false |
27 | | -# if true, ormat like this "local t <const> = 1" |
28 | | -keep_one_space_between_namedef_and_attribute = false |
29 | | -# see document for detail |
30 | | -continuous_assign_statement_align_to_equal_sign = true |
31 | | -# see document for detail |
32 | | -continuous_assign_table_field_align_to_equal_sign = true |
33 | | -# if true, the label loses its current indentation |
34 | | -label_no_indent = false |
35 | | -# if true, there will be no indentation in the do statement |
36 | | -do_statement_no_indent = false |
37 | | -# if true, the conditional expression of the if statement will not be a continuation line indent |
38 | | -if_condition_no_continuation_indent = false |
39 | | - |
40 | | -# optional crlf/lf |
41 | | -end_of_line = crlf |
42 | | - |
43 | | -# [Row layout] |
44 | | -# The following configuration supports three expressions |
45 | | -# minLine:${n} |
46 | | -# keepLine |
47 | | -# KeepLine:${n} |
48 | | - |
49 | | -keep_line_after_if_statement = minLine:0 |
50 | | -keep_line_after_do_statement = minLine:0 |
51 | | -keep_line_after_while_statement = minLine:0 |
52 | | -keep_line_after_repeat_statement = minLine:0 |
53 | | -keep_line_after_for_statement = minLine:0 |
54 | | -keep_line_after_local_or_assign_statement = keepLine |
55 | | -keep_line_after_function_define_statement = keepLine:1 |
56 | | - |
57 | | -# [diagnostic] |
58 | | -# the following is code diagnostic options |
59 | | -enable_check_codestyle = true |
60 | | -# this mean utf8 length |
61 | | -max_line_length = 120 |
62 | | -# this will check text end with new line(format always end with new line) |
63 | | -insert_final_newline = true |
64 | | - |
65 | | -# [name style check] |
66 | | -enable_name_style_check = false |
67 | | -# the following is name style check rule |
68 | | -# base option off/camel_case/snake_case/upper_snake_case/pascal_case/same(filename/first_param/'<const string>', snake_case/pascal_case/camel_case) |
69 | | -# all option can use '|' represent or |
70 | | -# for example: |
71 | | -# snake_case | upper_snake_case |
72 | | -# same(first_param, snake_case) |
73 | | -# same('m') |
74 | | -local_name_define_style = snake_case |
75 | | -function_param_name_style = snake_case |
76 | | -function_name_define_style = snake_case |
77 | | -local_function_name_define_style = snake_case |
78 | | -table_field_name_define_style = snake_case |
79 | | -global_variable_name_define_style = snake_case|upper_snake_case |
80 | | -module_name_define_style = same('m')|same(filename, snake_case) |
81 | | -require_module_name_style = same(first_param, snake_case) |
82 | | -class_name_define_style = same(filename, snake_case) |
0 commit comments