|
| 1 | + |
| 2 | +# see https://github.com/CppCXY/EmmyLuaCodeStyle |
| 3 | +[*.lua] |
| 4 | +# optional space/tab |
| 5 | +indent_style = space |
| 6 | +# if indent_style is space, this is valid |
| 7 | +indent_size = 4 |
| 8 | +# if indent_style is tab, this is valid |
| 9 | +tab_width = 8 |
| 10 | +continuation_indent_size = 4 |
| 11 | +align_call_args = false |
| 12 | +keep_one_space_between_call_args_and_bracket = false |
| 13 | +align_function_define_params = true |
| 14 | +keep_one_space_between_table_and_bracket = true |
| 15 | +align_table_field_to_first_field = true |
| 16 | +continuous_assign_statement_align_to_equal_sign = true |
| 17 | +continuous_assign_table_field_align_to_equal_sign = true |
| 18 | +# optional crlf/lf |
| 19 | +end_of_line = crlf |
| 20 | + |
| 21 | +# The following configuration supports three expressions |
| 22 | +# minLine:${n} |
| 23 | +# keepLine |
| 24 | +# KeepLine:${n} |
| 25 | + |
| 26 | +keep_line_after_if_statement = minLine:1 |
| 27 | +keep_line_after_do_statement = minLine:1 |
| 28 | +keep_line_after_while_statement = minLine:1 |
| 29 | +keep_line_after_repeat_statement = minLine:1 |
| 30 | +keep_line_after_for_statement = minLine:1 |
| 31 | +keep_line_after_local_or_assign_statement = keepLine |
| 32 | +keep_line_after_function_define_statement = keepLine:1 |
| 33 | + |
| 34 | +# the following is code diagnostic options |
| 35 | +enable_check_codestyle = false |
| 36 | +# this mean utf8 length |
| 37 | +max_line_length = 120 |
| 38 | +# this will check text end with new line(format always end with new line) |
| 39 | +insert_final_newline = true |
| 40 | + |
| 41 | + |
| 42 | +enable_name_style_check = true |
| 43 | +# the following is name style check rule |
| 44 | +# base option off/camel_case/snake_case/upper_snake_case/pascal_case/same(filename/first_param/'<const string>', snake_case/pascal_case/camel_case) |
| 45 | +# all option can use '|' represent or |
| 46 | +# for example: |
| 47 | +# snake_case | upper_snake_case |
| 48 | +# same(first_param, snake_case) |
| 49 | +# same('m') |
| 50 | +local_name_define_style = snake_case |
| 51 | +function_param_name_style = snake_case |
| 52 | +function_name_define_style = snake_case |
| 53 | +local_function_name_define_style = snake_case |
| 54 | +table_field_name_define_style = snake_case |
| 55 | +global_variable_name_define_style = snake_case|upper_snake_case |
| 56 | +module_name_define_style = same('m')|same(filename, snake_case) |
| 57 | +require_module_name_style = same(first_param, snake_case) |
| 58 | +class_name_define_style = same(filename, snake_case) |
0 commit comments