Closed cepehang closed 9 months ago
The --stdin-filename
option is available since mix version 1.14 but Ubuntu 20 only has mix version 1.9 in its repositories.
One option would be to add an apheleia-mix-format
script, similar to https://github.com/radian-software/apheleia/blob/main/scripts/formatters/apheleia-phpcs, which would run mix-format --version
(or equivalent) and cache the output on disk somewhere in $XDG_CACHE_HOME
, invalidating that cache when the mtime of the mix-format
binary is updated. Then it would either pass the argument or not, depending on the version.
That might be more effort than it's worth, though, given that you also have the opportunity to just change the formatter options directly in your init.el
.
Allows mix to format files other than elixir or erlang files, e.g.
.heex
files given :