3

rust-clippy is a linter for Rust. Is there an existing package or idiom that integrates it into an Emacs Rust workflow, the way emacs-racer integrates racer?

1
  • You can consider integrate rust-clippy into flycheck. May 31, 2016 at 1:25

2 Answers 2

2

Since rust-clippy normally works at compile time, it should get integrated into whatever you are using for compiling Rust code in Emacs (e.g. cargo-minor-mode). This is touched on in this blog post on setting up Emacs for Rust, in case you have not seen it already.

2

When you use rust-analyzer via lsp-mode you can tell it to use clippy as the default linter via (setq lsp-rust-analyzer-cargo-watch-command "clippy") (normally it would use check).

The config presented in this guide uses it by default.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.