Closed lmburns closed 1 year ago
there is currently no such way, so you would like such an option?
Yes I would.
I would much prefer to use this as my formatter instead of LuaFormatter because this has many more options. I like how I am able to give an extra space on some blocks and have them aligned, while leaving others alone. Though, I would like to be able to force all if I wanted that as well. Some of the things LuaFormatter has would be nice to have here (if possible). They are some of the following:
if
, while
, for
, ...) to one line.(
of function call if columns greater than max_line_length
.)
of function call if columns greater than max_line_length
.break_after_functioncall_rp
and break_before_functioncall_rp
align_call_args
.(
of function definition if columns greater than max_line_length
.break_after_functioncall_lp
except for function definitions.)
of function define if columns greater than max_line_length
.break_before_functioncall_lp
except for function definitions.{
of a table if columns greater than max_line_length
.break_all_list_when_line_exceed
.}
of a table if columns greater than max_line_length
.break_after_table_lb
max_line_length
but specifically for arrays and key-value tables.across_comments
= allow consecutive assignments to be aligned across a comment block separating themacross_blank_lines
= allow consecutive assignments to be aligned across n
blank lines separating themand
/or
operator.if
(could be
based on max_line_length
or if the person has put a newline before the operator).if fn.expand("%") == ""
or exclude_ft:contains(vim.bo[bufnr].ft)
or exclude_bt:contains(vim.bo[bufnr].bt)
or D.is_floating_window() then
return true
end
CodeFormat
requires two calls to correctly align the calling arguments:
If there is anything else I can think of, I will add it here.
so many feature requests, I may need to modify the break line algorithm architecture
Please separate bug reporting and feature requests, I'll handle it
The original issue has been solved, other feature request please new issue
Is there a way to align consecutive assignments (both local/variable and table) without needing to have one of the assignments have an extra space in between the equals sign?
That is, the following will not align:
But this will:
The only difference is that
M.icons.lsp.err
has an extra space after it. I would like to align consecutive assignments no matter what, regardless of whether or not there is an extra space there.