LiveView 0.17.8 and later includes Phoenix.LiveView.HTMLFormatter for formatting HEEx templates.
It’s a mix format plugin that’s added to the .formatter.exs file by default when you generate a Phoenix 1.7 app:
[
plugins: [Phoenix.LiveView.HTMLFormatter],
inputs: ["*.{heex,ex,exs}", "{config,lib,test}/**/*.{heex,ex,exs}", "priv/*/seeds.exs"]
# ...