From e945347f6eb64f00404a04859345f8148df045d0 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Sat, 9 Dec 2023 07:43:54 +0000 Subject: [PATCH] emacs: enable cargo clippy for rust-analyzer / eglot --- home/emacs/init.el | 10 +++++++++- home/emacs/init.org | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/home/emacs/init.el b/home/emacs/init.el index 88c7093e..8b9c597f 100644 --- a/home/emacs/init.el +++ b/home/emacs/init.el @@ -497,7 +497,15 @@ :custom (eglot-extend-to-xref t) (eglot-autoshutdown t) - (eglot-autoreconnect nil)) + (eglot-autoreconnect nil) + :config + (add-to-list 'eglot-server-programs + `((rust-ts-mode rust-mode) . ("rust-analyzer" + :initializationOptions + ( :check (:command "clippy") + :procMacro (:enable t) + :cargo ( :buildScripts (:enable t) + :features "all")))))) (use-package flymake :ensure t diff --git a/home/emacs/init.org b/home/emacs/init.org index 13fd2ee9..f283ae7f 100644 --- a/home/emacs/init.org +++ b/home/emacs/init.org @@ -597,7 +597,15 @@ For reference information, see [[https://orgmode.com][Org-mode website]] :custom (eglot-extend-to-xref t) (eglot-autoshutdown t) - (eglot-autoreconnect nil)) + (eglot-autoreconnect nil) + :config + (add-to-list 'eglot-server-programs + `((rust-ts-mode rust-mode) . ("rust-analyzer" + :initializationOptions + ( :check (:command "clippy") + :procMacro (:enable t) + :cargo ( :buildScripts (:enable t) + :features "all")))))) #+END_SRC ** Flymake