lang/rust: refactor & bind +rust/build-menu
This commit is contained in:
parent
1765ca7282
commit
0d056149be
1 changed files with 7 additions and 2 deletions
|
@ -10,10 +10,15 @@
|
||||||
(set! :env "RUST_SRC_PATH")
|
(set! :env "RUST_SRC_PATH")
|
||||||
(set! :docset 'rust-mode "Rust")
|
(set! :docset 'rust-mode "Rust")
|
||||||
(setq rust-indent-method-chain t)
|
(setq rust-indent-method-chain t)
|
||||||
|
|
||||||
|
(map! :map rust-mode-map
|
||||||
|
:localleader
|
||||||
|
:n "b" #'+rust/build-menu)
|
||||||
(def-menu! +rust/build-menu
|
(def-menu! +rust/build-menu
|
||||||
"TODO"
|
"TODO"
|
||||||
'(("run" :exec "cargo run" :cwd t :when (+rust-cargo-project-p))
|
'(("cargo run" :exec "cargo run --color always")
|
||||||
("build" :exec "cargo build" :cwd t :when (+rust-cargo-project-p)))
|
("cargo build" :exec "cargo build --color always")
|
||||||
|
("cargo test" :exec "cargo test --color always"))
|
||||||
:prompt "Cargo: "))
|
:prompt "Cargo: "))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue