# `Astral.Formatter`
[🔗](https://github.com/elixir-volt/astral/blob/v0.7.0/lib/astral/formatter.ex#L1)

Formats `.astral` templates through the standard `mix format` pipeline.

Add `Astral.Formatter` to `:plugins` and include `.astral` files in `:inputs`
in `.formatter.exs`. Elixir setup blocks use `Code.format_string!/2`; template
bodies use `Phoenix.LiveView.HTMLFormatter`. JavaScript and TypeScript script
bodies delegate to Volt unless an explicit `:tag_formatters` override is set.

Phoenix's HEEx formatting options, including `:heex_line_length`,
`:attribute_formatters` and `:tag_formatters`, are passed through. Styles and
non-JavaScript script bodies are left to Phoenix's preservation rules.

# `features`

Advertise `.astral` support to Mix.

# `format`

Format setup Elixir and HEEx using the same source boundary as the renderer.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
