mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-02-14 09:39:51 +00:00
title, homepage, tagline
| title | homepage | tagline |
|---|---|---|
| vim-rust | https://github.com/rust-lang/rust.vim | vim-rust (rust.vim) adds Rust language support for Vim. |
To update (replacing the current version) run webi vim-rust.
Files
These are the files / directories that are created and/or modified with this install:
~/.vim/pack/plugins/start/rust.vim/
~/.vim/plugins/rust.vim
Cheat Sheet
vim-rustprovides integration withcargo check,rustfmt, and other rust tooling.
You'll also need to install ALE (part of
vim-essentials) or
syntastic first.
How to install and configure by hand
-
Remove the previous version of rust.vim, if any:
rm -rf ~/.vim/pack/plugins/start/rust.vim -
Install
rust.vimas a Vim8 package withgit:mkdir -p ~/.vim/pack/plugins/start/ git clone --depth=1 \ https://github.com/rust-lang/rust.vim \ ~/.vim/pack/plugins/start/rust.vim -
Create
~/.vim/plugins/rust.vim, as follows:" Reasonable defaults for rust.vim " run rustfmt on save let g:rustfmt_autosave = 1 " run cargo check et al let g:ale_rust_cargo_use_check = 1 let g:ale_rust_cargo_check_tests = 1 let g:ale_rust_cargo_check_examples = 1 -
Edit
~/.vimrcto include the config:" Rust: reasonable defaults for rust.vim source ~/.vim/plugins/rust.vim