File tree 1 file changed +14
-1
lines changed
1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 19
19
:type 'boolean
20
20
:group 'rust-mode )
21
21
22
+ (defcustom rust-cargo-locate-default-arguments '(" --workspace" )
23
+ " Arguments for `cargo locate-project`. Remove `--workspace` if you
24
+ would prefer to use the local crate Cargo.toml instead of the
25
+ worksapce for commands like `cargo check`."
26
+ :type '(repeat string)
27
+ :group 'rust-mode )
28
+
22
29
(defcustom rust-cargo-default-arguments " "
23
30
" Default arguments when running common cargo commands."
24
31
:type 'string
42
49
(setq-local process-environment env)
43
50
; ; Set PATH so we can find cargo.
44
51
(setq-local exec-path path)
45
- (let ((ret (process-file rust-cargo-bin nil (list (current-buffer ) nil ) nil " locate-project" " --workspace" )))
52
+ (let ((ret
53
+ (let ((args
54
+ (append
55
+ (list rust-cargo-bin nil (list (current-buffer ) nil ) nil
56
+ " locate-project" )
57
+ rust-cargo-locate-default-arguments)))
58
+ (apply #'process-file args))))
46
59
(when (/= ret 0 )
47
60
(error " `cargo locate-project' returned %s status: %s " ret (buffer-string )))
48
61
(goto-char 0 )
You can’t perform that action at this time.
0 commit comments