summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Turner <jturner.usa@gmail.com>2025-11-06 13:07:40 -0500
committerJohn Turner <jturner.usa@gmail.com>2025-11-06 13:07:40 -0500
commited16bb7bce3a49f3f3c685822f772e83a978866a (patch)
tree34c058c0717063821120eb2cdab35d70c2f24351
parent9915b3a585a7a75e9126df9e0e9d1df8057ae3cf (diff)
downloadrust-mode-ed16bb7bce3a49f3f3c685822f772e83a978866a.tar.gz
support running cargo on remote machinesHEADmaster
-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))))