ale icon indicating copy to clipboard operation
ale copied to clipboard

Add option to use rebar3 fmt instead of standalone erlfmt

Open yosida95 opened this issue 1 year ago • 1 comments
trafficstars

The current implementation of the fixer for erlfmt, an Erlang code formatter, invokes a standalone erlfmt command. However, the standalone erlfmt command is not distributed by default. Instead, erlfmt is often used as a plugin for Rebar3, the de facto build tool for Erlang.

This patch introduces a new option g:ale_erlang_erlfmt_use_rebar, which is disabled by default, allowing the use of rebar3 fmt instead.

Additionally, this patch fixes a bug that caused the command to read the original source code rather than the stdin.

yosida95 avatar Jul 31 '24 14:07 yosida95

@w0rp Thank you for your feedback! I have addressed the points you raised. Could you please review the changes again?

yosida95 avatar Aug 02 '24 07:08 yosida95

This pull request has been automatically marked as stale because it has not been updated recently. Make sure to write tests and document your changes. See :help ale-dev for information on writing tests. If your pull request is good to merge, bother w0rp or another maintainer again, and get them to merge it.

stale[bot] avatar Feb 01 '25 01:02 stale[bot]

I'll close this until it can be reworked and rebased a little. It might make sense to make rebar3 by default, if that makes sense.

w0rp avatar Mar 10 '25 21:03 w0rp