From f621c6c38cf902d3634358db48d479b40a3e49c4 Mon Sep 17 00:00:00 2001 From: Tom Conroy Date: Thu, 16 May 2024 16:15:44 -0400 Subject: [PATCH] Fix mix-format for `.heex` files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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". ``` --- apheleia-formatters.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apheleia-formatters.el b/apheleia-formatters.el index a96272b..8f5d313 100644 --- a/apheleia-formatters.el +++ b/apheleia-formatters.el @@ -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"))