Closed NickBoyadjian closed 8 months ago
Is it expected behavior to use such a file if it's present? Can you point to some documentation that explains what Apheleia should be doing? I'm not familiar with the Elixir ecosystem.
I definitely think that would be the expected behavior. If you check out these docs, you can see that the default is to read from the .formatter.exs file.
https://hexdocs.pm/mix/main/Mix.Tasks.Format.html
The main issue is that when saving a file, apheleia runs the "mix format" command from the directory that the current open buffer is in, rather than the project root directory.
Maybe something like https://github.com/radian-software/apheleia/pull/239? (I haven't tested it, I don't have an Elixir toolchain installed locally.)
That's awesome, thank you! I just tested it in my emacs and it worked perfectly :D
Fantastic, merged :)
When formatting a file within a project that has a
.formatter.exs
file, apheleia is not using this config to format the file.