Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use Lua.format.defaultConfig? #99

Open
FalcoGer opened this issue Nov 13, 2023 · 0 comments
Open

How to use Lua.format.defaultConfig? #99

FalcoGer opened this issue Nov 13, 2023 · 0 comments

Comments

@FalcoGer
Copy link

FalcoGer commented Nov 13, 2023

I have read the documentation for it here, but it doesn't seem to do anything. On top of that, coc gives me lots of diagnostics about wrong types, wanting anything that isn't a string to be a string.

If I make everything a string it still doesn't work.

Here is my config. When I call coc's format action, the indents don't change to 2 wide, for instance and instead go to the default of 4.

{
    "Lua.format.enable": true,
    "Lua.format.defaultConfig": {
        "indent_style":"space",
        "indent_size":2,
        "quote_style":"double",
        "call_arg_parentheses":"keep",
        "continuation_indent":8,
        "max_line_length":120,
        "end_of_line":"unset",
        "trailing_table_separator":"always",
        "detect_end_of_line":true,
        "insert_final_newline":true,
        "space_around_table_field_list":false,
        "space_before_attribute":true,
        "space_before_function_open_parenthesis":false,
        "space_before_function_call_open_parenthesis":false,
        "space_before_closure_open_parenthesis":false,
        "space_before_function_call_single_arg": true,
        "space_before_open_square_bracket": false,
        "space_inside_function_call_parentheses":false,
        "space_inside_function_param_list_parentheses":false,
        "space_inside_square_brackets":false,
        "space_around_table_append_operator":true,
        "ignore_spaces_inside_function_call":true,
        "space_before_inline_comment": true,
        "space_around_math_operator": true,
        "space_after_comma":true,
        "space_after_comma_in_for_statement": true,
        "space_around_concat_operator":true,
        "align_call_args":true,
        "align_function_params":true,
        "align_continuous_assign_statement":true,
        "align_continuous_rect_table_field":true,
        "align_if_branch":false,
        "align_array_table":true,
        "never_indent_before_if_condition":false,
        "never_indent_comment_on_if_branch":false,
        "line_space_after_if_statement":"fixed(0)",
        "line_space_after_do_statement":"fixed(0)",
        "line_space_after_while_statement":"fixed(0)",
        "line_space_after_repeat_statement":"fixed(0)",
        "line_space_after_for_statement":"fixed(0)",
        "line_space_after_local_or_assign_statement":"max(2)",
        "line_space_after_function_statement":"min(2)",
        "line_space_after_expression_statement":"max(2)",
        "line_space_after_comment":"keep",
        "break_all_list_when_line_exceed":true,
        "auto_collapse_lines":false,
        "ignore_space_after_colon":false,
        "remove_call_expression_list_finish_comma":true,
        "end_statement_with_semicolon": "same_line"
    },
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant