From ed16bb7bce3a49f3f3c685822f772e83a978866a Mon Sep 17 00:00:00 2001 From: John Turner Date: Thu, 6 Nov 2025 13:07:40 -0500 Subject: support running cargo on remote machines --- rust-cargo.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)))) -- cgit v1.2.3