rust: adapt Cargo key binding to conventions

This commit is contained in:
syl20bnr 2015-05-13 23:45:26 -04:00
parent a386b5a7b7
commit 539ff8da7c
2 changed files with 24 additions and 4 deletions

View file

@ -14,12 +14,32 @@
## Description
This layer aims to support Rust development in Spacemacs.
This layer aims to support [Rust][] development in Spacemacs.
For now only basic support for [Cargo][] is provided.
## Install
### Layer
To use this layer, add it to your `~/.spacemacs`
```elisp
(setq-default dotspacemacs-configuration-layers '(rust))
```
### Cargo
[Cargo][] is a project management command line tool for Rust.
Installation instructions can be found on the main page of [Cargo][].
## Key bindings
Key Binding | Description
---------------------|------------------------------------------------------------
<kbd>SPC m c c</kbd> | compile project with Cargo
<kbd>SPC m c x</kbd> | compile and execute project with Cargo
<kbd>SPC m t a</kbd> | execute all tests with Cargo
[Rust]: http://www.rust-lang.org/
[Cargo]: http://doc.crates.io/index.html

View file

@ -41,9 +41,9 @@ which require an initialization must be listed explicitly in the list.")
;; (spacemacs/declare-prefix-for-mode 'rust-mode "mc" "cargo")
(evil-leader/set-key-for-mode 'rust-mode
"mcb" 'spacemacs/rust-cargo-build
"mcr" 'spacemacs/rust-cargo-run
"mct" 'spacemacs/rust-cargo-test)))
"mcc" 'spacemacs/rust-cargo-build
"mcC" 'spacemacs/rust-cargo-run
"mta" 'spacemacs/rust-cargo-test)))
"Initialize rust-mode"
)