4 ms·
Just in case anyone's not familiar with it, I figured it's worth pointing that rustfmt is also really customizable, using a `rustfmt.toml` file in the source di
by qchris 6y ago
Just in case anyone's not familiar with it, I figured it's worth pointing that rustfmt is also really customizable, using a `rustfmt.toml` file in the source directory. It might take a little time to get right, but it's not as if you're stuck with the default options, and a .toml file is pretty easy to play around with.
[1] https://rust-lang.github.io/rustfmt/?version=master&search= https://rust-lang.github.io/rustfmt/?version=master&search=
- ssokolow 6y agoUnfortunately, `rustfmt.toml` isn't expressive enough, even on nightly. I've had to make use of `rustfmt::skip` in various places to keep it from doing things like mangling the groupings and explanatory comments in `const` arrays or making code gratuitously tall and thin. ...and that sometimes means either `git gui` cherry-picking and only running rustfmt infrequently or applying `rustfmt::skip` too broadly because of errors like "error[E0658]: attributes on expressions are experimental" (I'm in the process of migrating from cherry-picking to over-broad `rustfmt::skip` so I can use format-on-save.)