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
?
Asked
Active
Viewed 2,051 times
3

Matthew Piziak
- 5,958
- 3
- 29
- 77
-
You can consider integrate rust-clippy into flycheck. – stardiviner May 31 '16 at 01:25
2 Answers
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.

Atheriel
- 21
- 1
1
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.

robertkrahn
- 51
- 2