spacemacs/layers/+lang/rust
2016-01-03 14:32:03 +01:00
..
img
config.el
funcs.el Add a function and keybinding for cargo clean 2015-10-07 15:51:40 -04:00
packages.el Make flycheck/flyspell hooks more explicit 2015-12-11 02:08:55 -05:00
README.org Fix markup and justification in Rust auto-completion documentation 2016-01-03 14:32:03 +01:00

Rust contribution layer for Spacemacs

/TakeV/spacemacs/media/commit/3e570dd5957cfd4c6cca1ee13913f717f07e4464/layers/+lang/rust/img/rust.png

Description

This layer aims to support Rust development in Spacemacs.

It supports Cargo, and has some basic auto-completion support through Racer, though Racer needs some additional configurations as described on their page.

Install

Layer

To use this layer, add it to your ~/.spacemacs

(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.

Auto-completion

To enable auto-completion, ensure that the auto-completion layer is enabled and add the following line to your dotspacemacs/user-init:

(setq-default rust-enable-racer t)

You have to install Racer to use this. For more information on the installation procedure, look here.

Key bindings

Key Binding Description
SPC m c c compile project with Cargo
SPC m c t run tests with Cargo
SPC m c d generate documentation with Cargo
SPC m c x execute the project with Cargo
SPC m c C remove build artifacts with Cargo