1.8 KiB
1.8 KiB
lang/rust
Description
Add support to Rust-lang and cargo.
Module Flags
+lsp
to add support Language server protocol.
Plugins
- Code completion (
racer
) - Syntax checking (
flycheck
) - Snippets
Prerequisites
To get started with Rust, you can either use rustup
and install rust with:
curl https://sh.rustup.rs -sSf | sh
Package manager is not recommended to install Nightly version of Rust what is
required for racer
from version 2.1 (more info in Troubleshooting)
Features
This module also supports LSP, it requires installation of Rust Language Server
RLS
. To enable this you need to enable lsp
in :tools
section in init.el
file.
Keybindings
Binding | Description |
---|---|
<localleader> b b |
cargo build |
<localleader> b c |
cargo check |
<localleader> b r |
cargo run |
<localleader> b t |
cargo test |
TODO Configuration
How to configure this module, including common problems and how to address them.
Troubleshooting
Racer installation problems
Racer need now (From 2.1 version) nightly version of Rust
If you installed trough rustup
rustup toolchain add nightly
cargo +nightly install racer