File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,11 @@ worksapce for commands like `cargo check`."
3131 :type 'string
3232 :group 'rust-mode )
3333
34+ (defcustom rust-cargo-clippy-default-arguments '()
35+ " Default arguments for running `cargo clippy`."
36+ :type '(repeat string)
37+ :group 'rust-mode )
38+
3439; ;; Buffer Project
3540
3641(defvar-local rust-buffer-project nil )
@@ -134,11 +139,13 @@ output buffer will be in comint mode, i.e. interactive."
134139 (interactive )
135140 (when (null rust-buffer-project)
136141 (rust-update-buffer-project))
137- (let* ((args (list rust-cargo-bin " clippy"
138- (concat " --manifest-path=" rust-buffer-project)))
142+ (let* ((args (append (list rust-cargo-bin " clippy"
143+ (concat " --manifest-path=" rust-buffer-project))
144+ rust-cargo-clippy-default-arguments))
139145 ; ; set `compile-command' temporarily so `compile' doesn't
140146 ; ; 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)))
142149 (rust--compile nil compile-command)))
143150
144151; ;; _
You can’t perform that action at this time.
0 commit comments