Rewrap-like functionality in a formatter

I have recently started messing with Zed as an editor. I really, really like it.

While I don’t go too heavy on extensions, one that I really love is Rewrap. Zed has native support for very basic rewrapping, but Rewrap is very smart about markdown in docstrings.

As much as I like Rewrap, what I have always actually wanted is a formatter to just enforce docstring formatting for a project. Save a file and boom… comments and docstrings are wrapped, period.

Before I start looking into external formatters (Zed has a nice pipeline for formatting through multiple commands) is this something that’s doable via mix format using a plugin?