Add doc --open and build --release cargo commands

This commit is contained in:
Jeremy Dormitzer 2022-04-11 10:32:15 -04:00
parent 7a915c3252
commit 4f06847018

View File

@ -278,12 +278,19 @@
(defun run-command-recipe-cargo ()
(when-let* ((project-dir (locate-dominating-file default-directory "Cargo.toml"))
(cargo-cmds (get-cargo-commands project-dir)))
(-map
(lambda (cmd)
(list :command-name cmd
:command-line (format "cargo %s" cmd)
:working-dir project-dir))
cargo-cmds)))
(-concat (-map
(lambda (cmd)
(list :command-name cmd
:command-line (format "cargo %s" cmd)
:working-dir project-dir))
cargo-cmds)
(list
(list :command-name "doc --open"
:command-line "cargo doc --open"
:working-dir project-dir)
(list :command-name "build --release"
:command-line "cargo build --release"
:working-dir project-dir)))))
:general
(leader-map "\"" #'run-command)