summaryrefslogtreecommitdiff
path: root/.emacs.d/lisp/rust-cargo.el
diff options
context:
space:
mode:
authorSimeon Simeonov2026-01-06 21:25:57 +0100
committerSimeon Simeonov2026-01-06 21:25:57 +0100
commit5c2c9a50da3a3f534842ffe95a49fe990000a072 (patch)
tree4d798cad751adb7f532d1ad134c87d27cc59931b /.emacs.d/lisp/rust-cargo.el
parent4ccca9a08a613417baf81a55e1b33292cd869b63 (diff)
Update markdown, rust and yasnippet
Diffstat (limited to '.emacs.d/lisp/rust-cargo.el')
-rw-r--r--.emacs.d/lisp/rust-cargo.el13
1 files changed, 10 insertions, 3 deletions
diff --git a/.emacs.d/lisp/rust-cargo.el b/.emacs.d/lisp/rust-cargo.el
index d9f1be5..d323b5d 100644
--- a/.emacs.d/lisp/rust-cargo.el
+++ b/.emacs.d/lisp/rust-cargo.el
@@ -31,6 +31,11 @@ worksapce for commands like `cargo check`."
31 :type 'string 31 :type 'string
32 :group 'rust-mode) 32 :group 'rust-mode)
33 33
34(defcustom rust-cargo-clippy-default-arguments '()
35 "Default arguments for running `cargo clippy`."
36 :type '(repeat string)
37 :group 'rust-mode)
38
34;;; Buffer Project 39;;; Buffer Project
35 40
36(defvar-local rust-buffer-project nil) 41(defvar-local rust-buffer-project nil)
@@ -134,11 +139,13 @@ output buffer will be in comint mode, i.e. interactive."
134 (interactive) 139 (interactive)
135 (when (null rust-buffer-project) 140 (when (null rust-buffer-project)
136 (rust-update-buffer-project)) 141 (rust-update-buffer-project))
137 (let* ((args (list rust-cargo-bin "clippy" 142 (let* ((args (append (list rust-cargo-bin "clippy"
138 (concat "--manifest-path=" rust-buffer-project))) 143 (concat "--manifest-path=" rust-buffer-project))
144 rust-cargo-clippy-default-arguments))
139 ;; set `compile-command' temporarily so `compile' doesn't 145 ;; set `compile-command' temporarily so `compile' doesn't
140 ;; clobber the existing value 146 ;; clobber the existing value
141 (compile-command (mapconcat #'shell-quote-argument args " "))) 147 (compile-command (concat (mapconcat #'shell-quote-argument args " ")
148 " " rust-cargo-default-arguments)))
142 (rust--compile nil compile-command))) 149 (rust--compile nil compile-command)))
143 150
144;;; _ 151;;; _