Skip to main content

Module fmt

Module fmt 

Source
Expand description

whisker fmt — a rustfmt drop-in that also formats Whisker’s render! / css! macro bodies.

Three modes:

  • whisker fmt <files...> — format each file in place (or print to stdout with --check).
  • whisker fmt --stdin — read stdin, write formatted to stdout. This is the rust-analyzer integration point: rust-analyzer.rustfmt.overrideCommand = ["whisker", "fmt", "--stdin"].
  • whisker fmt --check <files...> — don’t write; print a unified diff and exit non-zero if any file would change.

There are NO whisker-specific formatting options: the layout values (whisker_fmt::FmtOptions) come from the nearest rustfmt.toml (resolved per file directory), and the base Rust pass shells out to the real rustfmt binary which reads rustfmt.toml itself.

Structs§

FmtArgs

Functions§

run