rust-lang / rust-mode

Emacs configuration for Rust
Apache License 2.0
1.1k stars 176 forks source link

Support `cargo clippy --fix` on save, similar to `rustfmt` #413

Closed dconnolly closed 5 months ago

dconnolly commented 2 years ago

cargo clippy --fix has been stabilized as of Rust 1.55. It would be great if rust-mode had an option to run and apply these fixes on save in basically the exact same way as rustfmt is now via rust-format-on-save.

brotzeit commented 2 years ago

I added this feature for rustic and I think it's better to use a hook that runs before compilation instead of a before-save hook.

psibi commented 5 months ago

Closing this issue since this is available as part of rustic. The original rustic mode seems to be unmaintained now and I'm maintaining a fork now: https://github.com/psibi/rustic

When I discussed with @brotzeit last year, the idea was to keep rust-mode minimal and have additional features as part of rustic.