This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/layers/+lang/rust
2016-01-06 00:21:55 -05:00
..
img Use + instead of ! for layer categories 2015-09-11 00:13:51 -04:00
config.el Use + instead of ! for layer categories 2015-09-11 00:13:51 -04:00
funcs.el Add a function and keybinding for cargo clean 2015-10-07 15:51:40 -04:00
packages.el rust: add a keybinding for jump to definition 2016-01-03 22:23:11 -05:00
README.org Update install layer section in REAMDE.org files 2016-01-06 00:21:55 -05:00

Rust contribution layer for Spacemacs

/TakeV/spacemacs/media/commit/cddf18ff1e122fed233ac07d6e77c119260533f4/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 configuration layer, add it to your ~/.spacemacs. You will need to add rust to the existing dotspacemacs-configuration-layers list in this file.

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
SPC m g g go jump to definition