erlang-ls / erlang_ls

The Erlang Language Server
https://erlang-ls.github.io/
Apache License 2.0
620 stars 136 forks source link

Which Formatter is used by ErlangLS? #1438

Closed mkohlhaas closed 10 months ago

mkohlhaas commented 1 year ago

Just wonder which formatter is used by ErlangLS. I have integrated ErlangLS into neovim and can format code on the fly. But I would like to use the same formatter also from the command line to be consistent.

Kind regards!

lucavallerini commented 1 year ago

Based on rebar.config, it should be erlfmt by WhatsApp: https://github.com/WhatsApp/erlfmt

filmor commented 1 year ago

That's not true. erlfmt is so far (sadly) only used for parsing, formatting is done via rebar3_format, see https://github.com/erlang-ls/erlang_ls/blob/main/apps/els_lsp/src/els_formatting_provider.erl#L103.