mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
lang/rust: run cargo commands from Cargo.toml dir
Instead of the current directory, which breaks file links in the compilation buffer.
This commit is contained in:
@ -6,3 +6,9 @@
|
||||
(defun +rust-cargo-project-p ()
|
||||
"Return t if this is a cargo project."
|
||||
(locate-dominating-file buffer-file-name "Cargo.toml"))
|
||||
|
||||
;;;###autoload
|
||||
(defun +rust-cargo-compile (command)
|
||||
"TODO"
|
||||
(let ((default-directory (+rust-cargo-project-p)))
|
||||
(compile command)))
|
||||
|
Reference in New Issue
Block a user