The Wire · Showcase
ELIXIR FORMATTER DOCS FINALLY CATCH UP TO v1.15.0
By RepoJournal · Filed · About Elixir & Phoenix
A hidden sigil formatting option that's been in Elixir since v1.15.0 is finally documented, and you've probably been missing it.
Sigil callbacks have had access to an :opening_delimiter option in their opts for over a year [1], but it was never listed in the official Mix.Tasks.Format documentation alongside :sigil and :modifiers. This option lets your formatter distinguish between different sigil forms, like a heredoc sigil versus a regular one. If you're building custom formatters or need fine-grained control over how sigils are rendered, this changes what's possible. The documentation gap meant many developers either rediscovered this by digging through source code or shipped formatters without leveraging it. This is the kind of quiet capability that suddenly makes sense once you know it exists.
One email a day. Unsubscribe in one click.
Keep up with Elixir & Phoenix in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Check your custom formatters for :opening_delimiter handling if you target v1.15.0+ elixir-lang/elixir [plan]
References
- [1] Document :opening_delimiter option for Mix.Tasks.Format format/2 ↗ elixir-lang/elixir