Replace feature/eval build system with def-menu!

This commit is contained in:
Henrik Lissner 2017-10-03 02:49:08 +02:00
parent 63d5fec4aa
commit d0fcb23314
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
15 changed files with 51 additions and 160 deletions

View file

@ -2,4 +2,7 @@
;; TODO (defun +rust/run-cargo () (interactive))
;; TODO (defun +rust-cargo-project-p ())
;;;###autoload
(defun +rust-cargo-project-p ()
"Return t if this is a cargo project."
(doom-project-has! "Cargo.toml"))

View file

@ -11,8 +11,11 @@
(def-package! rust-mode
:mode "\\.rs$"
:config
(set! :build 'run-cargo '(rust-mode toml-mode) #'+rust/run-cargo
:when #'+rust-cargo-project-p))
(def-menu! +rust/build-menu
"TODO"
'(("run" :exec "cargo run" :cwd t :when (+rust-cargo-project-p))
("build" :exec "cargo build" :cwd t :when (+rust-cargo-project-p)))
:prompt "Cargo: "))
(def-package! racer