about summary refs log tree commit diff stats
path: root/.editorconfig
diff options
context:
space:
mode:
Diffstat (limited to '.editorconfig')
-rw-r--r--.editorconfig147
1 files changed, 147 insertions, 0 deletions
diff --git a/.editorconfig b/.editorconfig
index 8cfc43a5..bb0af45c 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -14,3 +14,150 @@ insert_final_newline = true
 charset = utf-8
 indent_style = space
 indent_size = 2
+
+
+# see https://github.com/CppCXY/EmmyLuaCodeStyle
+[*.lua]
+# [basic]
+
+# optional space/tab
+indent_style = space
+# if indent_style is space, this is valid
+indent_size = 2
+# none/single/double
+quote_style = double
+
+continuation_indent = 2
+
+# 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 = 120
+
+# optional crlf/lf/cr/auto, if it is 'auto', in windows it is crlf other platforms are lf
+# in neovim the value 'auto' is not a valid option, please use 'unset'
+end_of_line = lf
+
+#  none/ comma / semicolon / only_kv_colon
+table_separator_style = semicolon
+
+#optional keep/never/always/smart
+trailing_table_separator = always
+
+# keep/remove/remove_table_only/remove_string_only
+# TODO: Is there a way to add them?
+call_arg_parentheses = keep
+
+detect_end_of_line = false
+
+# this will check text end with new line
+insert_final_newline = true
+
+# [space]
+space_around_table_field_list = true
+
+space_before_attribute = true
+
+space_before_function_open_parenthesis = false
+
+space_before_function_call_open_parenthesis = false
+
+space_before_closure_open_parenthesis = false
+
+# optional always/only_string/only_table/none
+# or true/false
+space_before_function_call_single_arg = false
+
+space_before_open_square_bracket = false
+
+space_inside_function_call_parentheses = false
+
+space_inside_function_param_list_parentheses = false
+
+space_inside_square_brackets = false
+
+# like t[#t+1] = 1
+space_around_table_append_operator = false
+
+ignore_spaces_inside_function_call = false
+
+space_before_inline_comment = 1
+
+# [operator space]
+space_around_math_operator = true
+
+space_after_comma = true
+
+space_after_comma_in_for_statement = true
+
+space_around_concat_operator = true
+
+# [align]
+
+align_call_args = true
+
+align_function_params = true
+
+align_continuous_assign_statement = true
+
+align_continuous_rect_table_field = true
+
+align_continuous_line_space = 2
+
+align_if_branch = true
+
+# option none / always / contain_curly/
+align_array_table = true
+
+align_continuous_similar_call_args = false
+
+align_continuous_inline_comment = true
+# option none / always / only_call_stmt
+align_chain_expr = always
+
+# [indent]
+
+never_indent_before_if_condition = false
+
+never_indent_comment_on_if_branch = false
+
+keep_indents_on_empty_lines = false
+# [line space]
+
+# The following configuration supports four expressions
+# keep
+# fixed(n)
+# min(n)
+# max(n)
+# for eg. min(2)
+
+line_space_after_if_statement = keep
+
+line_space_after_do_statement = keep
+
+line_space_after_while_statement = keep
+
+line_space_after_repeat_statement = keep
+
+line_space_after_for_statement = keep
+
+line_space_after_local_or_assign_statement = keep
+
+line_space_after_function_statement = fixed(2)
+
+line_space_after_expression_statement = keep
+
+line_space_after_comment = keep
+
+line_space_around_block = fixed(1)
+# [line break]
+break_all_list_when_line_exceed = true
+
+auto_collapse_lines = false
+
+break_before_braces = false
+# [preference]
+ignore_space_after_colon = false
+
+remove_call_expression_list_finish_comma = false
+
+end_statement_with_semicolon = true