Skip to content

Commit

Permalink
Fix mix-format for .heex files
Browse files Browse the repository at this point in the history
Per the documentation for `mix format`:

```
  • --stdin-filename - path to the file being formatted on stdin. This is
    useful if you are using plugins to support custom filetypes such as .heex.
    Without passing this flag, it is assumed that the code being passed via
    stdin is valid Elixir code. Defaults to "stdin.exs".
```
  • Loading branch information
tomconroy authored May 16, 2024
1 parent 66bf519 commit f621c6c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apheleia-formatters.el
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@
(ktlint . ("ktlint" "--log-level=none" "--stdin" "-F" "-"))
(latexindent . ("latexindent" "--logfile=/dev/null"))
(mix-format . ("apheleia-from-project-root"
".formatter.exs" "mix" "format" "-"))
".formatter.exs" "mix" "format"
"--stdin-filename" filepath "-"))
(nixfmt . ("nixfmt"))
(ocamlformat . ("ocamlformat" "-" "--name" filepath
"--enable-outside-detected-project"))
Expand Down

0 comments on commit f621c6c

Please sign in to comment.