fenollp / erlang-formatter

Format Erlang code using Emacs' erlang-mode
Apache License 2.0
45 stars 5 forks source link

Add command arguments to execute for a single file #42

Open omerkirk opened 3 years ago

omerkirk commented 3 years ago

Hi,

Thanks for this library, I was wondering if it is possible to add command line arguments to enable running formatting on a single file like below:

rebar3 fmt -f test.erl

It would be easier to integrate your plugin to other tools this way that might support format on save like VS Code. For example currently the erlang formatter plugin for VS Code supports 3 formatters erlfmt, rebar3_format, steamroller, I think emacs formatting would be a good addition to that list.

I have checked the emacs binary arguments and there is a --file flag along with --directory flag you are currently using. I. can submit a pull request with the proposed changes if you like.

fenollp commented 3 years ago

Sure I'll gladly review your pr :)

omerkirk commented 3 years ago

Thank you, will submit one today