summaryrefslogtreecommitdiff
path: root/rust-cargo.el
diff options
context:
space:
mode:
Diffstat (limited to 'rust-cargo.el')
-rw-r--r--rust-cargo.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/rust-cargo.el b/rust-cargo.el
index d323b5d..5f47a0e 100644
--- a/rust-cargo.el
+++ b/rust-cargo.el
@@ -90,7 +90,9 @@ worksapce for commands like `cargo check`."
(rust-update-buffer-project))
(let ((default-directory
(or (and rust-buffer-project
- (file-name-directory rust-buffer-project))
+ (if-let ((remote (file-remote-p (buffer-file-name))))
+ (file-name-concat remote (file-name-directory (rust-buffer-project)))
+ rust-buffer-project))
default-directory))
;; make sure comint is a boolean value
(comint (not (not comint))))