3 homepage: https://github.com/rust-lang/rust.vim
5 vim-rust (rust.vim) adds Rust language support for Vim.
8 To update (replacing the current version) run `webi vim-rust`.
12 > `vim-rust` provides integration with `cargo check`, `rustfmt`, and other rust
15 You'll also need to install [`ALE`](https://webinstall.dev/vim-ale) (part of
16 [`vim-essentials`](https://webinstall.dev/vim-essentials)) or
17 [`syntastic`](https://webinstall.dev/vim-syntastic) first.
19 ### How to install and configure by hand
21 1. Remove the previous version of rust.vim, if any:
23 rm -rf ~/.vim/pack/plugins/start/rust.vim
25 2. Install `rust.vim` as a Vim8 package with `git`:
27 mkdir -p ~/.vim/pack/plugins/start/
29 https://github.com/rust-lang/rust.vim \
30 ~/.vim/pack/plugins/start/rust.vim
32 3. Create `~/.vim/plugins/rust.vim`, as follows:
35 " Reasonable defaults for rust.vim
38 let g:rustfmt_autosave = 1
40 " run cargo check et al
41 let g:ale_rust_cargo_use_check = 1
42 let g:ale_rust_cargo_check_tests = 1
43 let g:ale_rust_cargo_check_examples = 1
46 4. Edit `~/.vimrc` to include the config:
48 " Rust: reasonable defaults for rust.vim
49 source ~/.vim/plugins/rust.vim