mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 03:25:23 +09:00
Switch from LuaCheck to LuaLS
This commit is contained in:
182
.editorconfig
Normal file
182
.editorconfig
Normal file
@@ -0,0 +1,182 @@
|
|||||||
|
|
||||||
|
# see https://github.com/CppCXY/EmmyLuaCodeStyle
|
||||||
|
[*.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 = double
|
||||||
|
|
||||||
|
# keep/remove/remove_table_only/remove_string_only
|
||||||
|
call_arg_parentheses = remove_table_only
|
||||||
|
|
||||||
|
## extend option
|
||||||
|
continuation_indent.in_expr = 0
|
||||||
|
continuation_indent.in_table = 4
|
||||||
|
continuation_indent.before_block = 4
|
||||||
|
|
||||||
|
# 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 = 200
|
||||||
|
|
||||||
|
# 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 = auto
|
||||||
|
|
||||||
|
# none/ comma / semicolon / only_kv_colon
|
||||||
|
table_separator_style = comma
|
||||||
|
|
||||||
|
# optional keep/never/always/smart
|
||||||
|
trailing_table_separator = smart
|
||||||
|
|
||||||
|
# should the tool detect endings by itself
|
||||||
|
detect_end_of_line = false
|
||||||
|
|
||||||
|
# this will check text end with new line
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
# [space]
|
||||||
|
|
||||||
|
space_around_table_field_list = keep
|
||||||
|
|
||||||
|
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
|
||||||
|
## extend option
|
||||||
|
## always/keep/none
|
||||||
|
# space_before_function_call_single_arg.table = always
|
||||||
|
## always/keep/none
|
||||||
|
# space_before_function_call_single_arg.string = always
|
||||||
|
space_before_function_call_single_arg = only_string
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
# detail number or 'keep'
|
||||||
|
space_before_inline_comment = 1
|
||||||
|
|
||||||
|
# convert '---' to '--- ' or '--' to '-- '
|
||||||
|
space_after_comment_dash = true
|
||||||
|
|
||||||
|
# [operator space]
|
||||||
|
|
||||||
|
space_around_math_operator = true
|
||||||
|
# space_around_math_operator.exponent = false
|
||||||
|
|
||||||
|
space_after_comma = true
|
||||||
|
|
||||||
|
space_after_comma_in_for_statement = true
|
||||||
|
|
||||||
|
# true/false or none/always/no_space_asym
|
||||||
|
space_around_concat_operator = true
|
||||||
|
|
||||||
|
space_around_logical_operator = true
|
||||||
|
|
||||||
|
# true/false or none/always/no_space_asym
|
||||||
|
space_around_assign_operator = true
|
||||||
|
|
||||||
|
# [align]
|
||||||
|
|
||||||
|
align_call_args = false
|
||||||
|
|
||||||
|
align_function_params = false
|
||||||
|
|
||||||
|
align_continuous_assign_statement = false
|
||||||
|
|
||||||
|
align_continuous_rect_table_field = false
|
||||||
|
|
||||||
|
align_continuous_line_space = 2
|
||||||
|
|
||||||
|
align_if_branch = false
|
||||||
|
|
||||||
|
# option none / always / contain_curly/
|
||||||
|
align_array_table = false
|
||||||
|
|
||||||
|
align_continuous_similar_call_args = false
|
||||||
|
|
||||||
|
align_continuous_inline_comment = false
|
||||||
|
|
||||||
|
# option none / always / only_call_stmt
|
||||||
|
align_chain_expr = none
|
||||||
|
|
||||||
|
# [indent]
|
||||||
|
|
||||||
|
never_indent_before_if_condition = true
|
||||||
|
|
||||||
|
never_indent_comment_on_if_branch = false
|
||||||
|
|
||||||
|
keep_indents_on_empty_lines = false
|
||||||
|
|
||||||
|
allow_non_indented_comments = 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 = max(2)
|
||||||
|
|
||||||
|
line_space_after_do_statement = max(2)
|
||||||
|
|
||||||
|
line_space_after_while_statement = fixed(2)
|
||||||
|
|
||||||
|
line_space_after_repeat_statement = fixed(2)
|
||||||
|
|
||||||
|
line_space_after_for_statement = fixed(2)
|
||||||
|
|
||||||
|
line_space_after_local_or_assign_statement = max(2)
|
||||||
|
|
||||||
|
line_space_after_function_statement = fixed(2)
|
||||||
|
|
||||||
|
line_space_after_expression_statement = max(2)
|
||||||
|
|
||||||
|
line_space_after_comment = max(2)
|
||||||
|
|
||||||
|
line_space_around_block = fixed(1)
|
||||||
|
|
||||||
|
# [line break]
|
||||||
|
|
||||||
|
break_all_list_when_line_exceed = false
|
||||||
|
|
||||||
|
auto_collapse_lines = false
|
||||||
|
|
||||||
|
break_before_braces = false
|
||||||
|
|
||||||
|
# [preference]
|
||||||
|
|
||||||
|
ignore_space_after_colon = false
|
||||||
|
|
||||||
|
remove_call_expression_list_finish_comma = true
|
||||||
|
|
||||||
|
# keep / always / same_line / replace_with_newline / never
|
||||||
|
end_statement_with_semicolon = same_line
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
|||||||
dist/
|
dist/
|
||||||
node_modules/
|
node_modules/
|
||||||
package-lock.json
|
package-lock.json
|
||||||
|
.vscode
|
||||||
|
|||||||
1697
.luacheckrc
1697
.luacheckrc
File diff suppressed because it is too large
Load Diff
69
.luarc.json
69
.luarc.json
@@ -1,5 +1,68 @@
|
|||||||
{
|
{
|
||||||
"Lua.diagnostics.disable": [
|
"$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json",
|
||||||
"luadoc-miss-type-name"
|
"completion.requireSeparator": "/",
|
||||||
]
|
"doc.privateName": [ "__" ],
|
||||||
|
"doc.protectedName": [ "_" ],
|
||||||
|
"runtime.version": "Lua 5.2",
|
||||||
|
"runtime.pluginArgs": [
|
||||||
|
"--clusterio-modules"
|
||||||
|
],
|
||||||
|
"diagnostics.unusedLocalExclude": [ "_", "i", "j", "k", "v" ],
|
||||||
|
"diagnostics.groupFileStatus": {
|
||||||
|
"ambiguity": "Any",
|
||||||
|
"await": "None",
|
||||||
|
"codestyle": "Opened",
|
||||||
|
"conventions": "Any",
|
||||||
|
"duplicate": "Any",
|
||||||
|
"global": "Any",
|
||||||
|
"luadoc": "Opened",
|
||||||
|
"redefined": "Opened",
|
||||||
|
"strict": "Fallback",
|
||||||
|
"strong": "Fallback",
|
||||||
|
"type-check": "Any",
|
||||||
|
"unbalanced": "Opened",
|
||||||
|
"unused": "Opened"
|
||||||
|
},
|
||||||
|
"diagnostics.neededFileStatus": {
|
||||||
|
"close-non-object": "Any",
|
||||||
|
"discard-returns": "Any",
|
||||||
|
"deprecated": "None",
|
||||||
|
"no-unknown": "None",
|
||||||
|
"spell-check": "None!"
|
||||||
|
},
|
||||||
|
"nameStyle.config": {
|
||||||
|
"local_name_style": [{
|
||||||
|
"type" : "pattern",
|
||||||
|
"param": "_?_?(\\w+)",
|
||||||
|
"$1": "snake_case"
|
||||||
|
}],
|
||||||
|
"function_param_name_style": [{
|
||||||
|
"type" : "pattern",
|
||||||
|
"param": "_?_?(\\w+)",
|
||||||
|
"$1": "snake_case"
|
||||||
|
}],
|
||||||
|
"function_name_style": [{
|
||||||
|
"type" : "pattern",
|
||||||
|
"param": "_?_?(\\w+)",
|
||||||
|
"$1": "snake_case"
|
||||||
|
}],
|
||||||
|
"local_function_name_style": [{
|
||||||
|
"type" : "pattern",
|
||||||
|
"param": "_?_?(\\w+)",
|
||||||
|
"$1": "snake_case"
|
||||||
|
}],
|
||||||
|
"table_field_name_style": [{
|
||||||
|
"type" : "pattern",
|
||||||
|
"param": "_?_?(\\w+)",
|
||||||
|
"$1": "snake_case"
|
||||||
|
}],
|
||||||
|
"global_variable_name_style": "upper_snake_case",
|
||||||
|
"module_name_style": [ "pascal_case", "snake_case" ],
|
||||||
|
"require_module_name_style": [ "pascal_case", "snake_case" ],
|
||||||
|
"class_name_style": "pascal_case",
|
||||||
|
"const_variable_name_style": "upper_snake_case"
|
||||||
|
},
|
||||||
|
"format.defaultConfig": {
|
||||||
|
"continuation_indent.in_expr": "0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user