You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could rustfmt not reformat on error, but with command-line option to override, please?
Rationale: I enter some invalid code (e.g. #![rustfmt::max_width(120)], which is not a valid rustfmt attribute), run cargo fmt, and get an error. Because rustfmt still changed the file in question I lose my editor's history (unless overriding its desire to reload a changed file), thus adjusting the invalid item becomes harder.
(BTW, is per-file/item configuration a thing? It would be nice sometimes.)
The text was updated successfully, but these errors were encountered:
(BTW, is per-file/item configuration a thing? It would be nice sometimes.)
AFAIK, inline config settings/overrides are not supported though that sounds like it could be a useful feature!
It's not per-file, but you can have multiple rustfmt config files though for different mods/directories if you want different settings for different files.
Could
rustfmt
not reformat on error, but with command-line option to override, please?Rationale: I enter some invalid code (e.g.
#![rustfmt::max_width(120)]
, which is not a valid rustfmt attribute), runcargo fmt
, and get an error. Becauserustfmt
still changed the file in question I lose my editor's history (unless overriding its desire to reload a changed file), thus adjusting the invalid item becomes harder.(BTW, is per-file/item configuration a thing? It would be nice sometimes.)
The text was updated successfully, but these errors were encountered: