diff --git a/Moose Development/Moose/.editorconfig b/Moose Development/Moose/.editorconfig new file mode 100644 index 000000000..2cc2ce1ca --- /dev/null +++ b/Moose Development/Moose/.editorconfig @@ -0,0 +1,166 @@ +# Repository: https://github.com/CppCXY/EmmyLuaCodeStyle +# English documentation: https://github.com/CppCXY/EmmyLuaCodeStyle/blob/master/README_EN.md +[*.lua] +# [basic] + +# optional space/tab +indent_style = space +# if indent_style is space, this is valid +indent_size = 4 +# if indent_style is tab, this is valid +tab_width = 4 +# none/single/double +quote_style = none + +# only support number +continuation_indent_size = 0 + +# optional crlf/lf/cr/auto, if it is 'auto', in windows it is crlf other platforms are lf +end_of_line = auto + +detect_end_of_line = false + +# this mean utf8 length , if this is 'unset' then the line width is no longer checked +# this option decides when to chopdown the code +max_line_length = 9999 + +# this will check text end with new line +insert_final_newline = true + +# [function] + +# function call expression's args will align to first arg +# optional true/false/only_after_more_indention_statement/only_not_exist_cross_row_expression +align_call_args = false + +# if true, all function define params will align to first param +align_function_define_params = true + +remove_expression_list_finish_comma = true + +# keep/remove/remove_table_only/remove_string_only/unambiguous_remove_string_only +call_arg_parentheses = keep + +# [table] + +#optional none/comma/semicolon +table_separator_style = none + +#optional keep/never/always/smart +trailing_table_separator = keep + +# see document for detail +continuous_assign_table_field_align_to_equal_sign = true + +# if true, format like this "local t = { 1, 2, 3 }" +keep_one_space_between_table_and_bracket = true + +# if indent_style is tab, this option is invalid +align_table_field_to_first_field = true + +# [statement] + +align_chained_expression_statement = false + +# continous line distance +max_continuous_line_distance = 1 + +# see document for detail +continuous_assign_statement_align_to_equal_sign = true + +# if statement will align like switch case +if_condition_align_with_each_other = false + +# if true, continuation_indent_size for local or assign statement is invalid +# however, if the expression list has cross row expression, it will not be aligned to the first expression +local_assign_continuation_align_to_first_expression = false + +statement_inline_comment_space = 1 + +# [indentation] + +# if true, the label loses its current indentation +label_no_indent = false +# if true, there will be no indentation in the do statement +do_statement_no_indent = false +# if true, the conditional expression of the if statement will not be a continuation line indent +if_condition_no_continuation_indent = false + +if_branch_comments_after_block_no_indent = false + +# [space] + +# if true, t[#t+1] will not space wrapper '+' +table_append_expression_no_space = false + +long_chain_expression_allow_one_space_after_colon = false + +remove_empty_header_and_footer_lines_in_function = true + +space_before_function_open_parenthesis = false + +space_inside_function_call_parentheses = false + +space_inside_function_param_list_parentheses = false + +space_before_open_square_bracket = false + +space_inside_square_brackets = false + +# if true, ormat like this "local t = 1" +keep_one_space_between_namedef_and_attribute = true + +# [row_layout] +# The following configuration supports four expressions +# minLine:${n} +# keepLine +# keepLine:${n} +# maxLine:${n} + +keep_line_after_if_statement = minLine:0 + +keep_line_after_do_statement = minLine:0 + +keep_line_after_while_statement = minLine:0 + +keep_line_after_repeat_statement = minLine:0 + +keep_line_after_for_statement = minLine:0 + +keep_line_after_local_or_assign_statement = keepLine + +keep_line_after_function_define_statement = keepLine:1 + +keep_line_after_expression_statement = keepLine + +# [diagnostic] + +# the following is code diagnostic options +enable_check_codestyle = true + +# [diagnostic.name_style] +enable_name_style_check = false +# the following is name style check rule +# base option off/camel_case/snake_case/upper_snake_case/pascal_case/same(filename/first_param/'', snake_case/pascal_case/camel_case) +# all option can use '|' represent or +# for example: +# snake_case | upper_snake_case +# same(first_param, snake_case) +# same('m') +local_name_define_style = snake_case + +function_param_name_style = snake_case + +function_name_define_style = snake_case + +local_function_name_define_style = snake_case + +table_field_name_define_style = snake_case + +global_variable_name_define_style = snake_case|upper_snake_case + +module_name_define_style = same('m')|same(filename, snake_case) + +require_module_name_style = same(first_param, snake_case) + +class_name_define_style = same(filename, snake_case) diff --git a/Moose Development/Moose/.lua-format b/Moose Development/Moose/.lua-format deleted file mode 100644 index 6fa8431a8..000000000 --- a/Moose Development/Moose/.lua-format +++ /dev/null @@ -1,33 +0,0 @@ -# See https://github.com/Koihik/LuaFormatter -# Use '-- LuaFormatter off' and '-- LuaFormatter on' around code blocks to inhibit formatting - -column_limit: 500 -indent_width: 2 -use_tab: false -continuation_indent_width: 2 -keep_simple_control_block_one_line: false -keep_simple_function_one_line: false -align_args: true -break_after_functioncall_lp: false -break_before_functioncall_rp: false -align_parameter: true -chop_down_parameter: true -break_after_functiondef_lp: false -break_before_functiondef_rp: false -align_table_field: true -break_after_table_lb: true -break_before_table_rb: true -chop_down_table: true -chop_down_kv_table: true -column_table_limit: 500 -table_sep: ',' -extra_sep_at_table_end: true -break_after_operator: true -single_quote_to_double_quote: false -double_quote_to_single_quote: false -spaces_before_call: 1 -spaces_inside_functiondef_parens: true -spaces_inside_functioncall_parens: true -spaces_inside_table_braces: true -spaces_around_equals_in_field: true -line_breaks_after_function_body: 1 \ No newline at end of file