We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Embedded erlfmt doesn't respect code conventions and generally isn't consistent with standalone erlfmt
erlfmt
Input snippet:
-module(some). f2(A, B) -> { ok, yes}. f(#{a := A, b := B, c := C}, Other) -> case f2(A, B) of undefined -> no; error -> no; {ok, _} -> yes end.
Formatting applied with escriptized WhatsApp/erlfmt, erlfmt -w some.erl:
erlfmt -w some.erl
-module(some). f2(A, B) -> { %% respects standalone brace ok, yes }. f(#{a := A, b := B, c := C}, Other) -> %% wider line len case f2(A, B) of undefined -> no; %% respects inline cases error -> no; {ok, _} -> yes end.
Formatting applied (via NVIM's vim.lsp.buf.format callback):
vim.lsp.buf.format
-module(some). f2(A, B) -> {ok, yes}. f(#{a := A, b := B, c := C}, Other) -> case f2(A, B) of undefined -> no; error -> no; {ok, _} -> yes end.
erlang_ls
The text was updated successfully, but these errors were encountered:
Can't reproduce. Are you sure erlfmt was configured as formatter?
Closing this, please re-open if I'm wrong :)
Sorry, something went wrong.
Are you reproducing it in v0.46? If it is fixed in v1, great!
No branches or pull requests
Embedded erlfmt doesn't respect code conventions and generally isn't consistent with standalone
erlfmt
To Reproduce
Input snippet:
Expected behavior
Formatting applied with escriptized WhatsApp/erlfmt,
erlfmt -w some.erl
:Actual behavior
Formatting applied (via NVIM's
vim.lsp.buf.format
callback):Context
erlang_ls
version (tag/sha): 0.46.0The text was updated successfully, but these errors were encountered: