rust.vim: Rust support for Vim, still documented for plugin managers that came before lazy.nvim
Vim configuration for Rust.
At a glance
- What is it?
- File detection, syntax, rustfmt integration and a command that runs the test under your cursor. No releases, ever. A dual licence in the files against a single licence in the sidebar, and an installation section frozen in the Vim 8 era.
- Who is it for?
- rust.vim remains a working choice if you already live in Vim and want rustfmt plus a single-test command without wiring anything together. It is not a Rust IDE: there is no completion engine, no rename, and no LSP story anywhere in the documentation, and the error checking path depends on Syntastic.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 7 days ago.
- What is it written in?
- Mainly Vim Script, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 9, 2026, and from our analysis. They are not legal advice.
Editorial analysis
A Vim plugin for Rust, and nothing more ambitious than that
The description is one sentence: a Vim plugin providing Rust file detection, syntax highlighting, formatting, Syntastic integration, and more. The repository language is reported as Vim Script, and the directory tree matches what you would expect from a filetype plugin rather than an application. There is `ftdetect/`, `ftplugin/`, `indent/`, `syntax/`, `autoload/`, `after/` and `doc/` for the standard Vim plugin anatomy, then `compiler/`, `ctags/` and `syntax_checkers/` for the Rust-specific extras, plus a `test/` directory and a `triagebot.toml` for automated issue triage.
That tree is the honest summary of the project. This is not a language server, not a completion engine and not a refactoring tool. Everything it does is either part of Vim's filetype machinery or a thin command wrapper around a binary you already have installed.
One requirement is stated at the top and is easy to skim past: the plugin requires Vim 8 or higher for full functionality, and the README says some things may not work on earlier versions. Vim 8 packages are the oldest supported install method on the page, so the floor is roughly a decade old at this point.
The repository is not archived and the last push was on 2026-10-02, so the code is being touched. There are, however, no GitHub releases at all. For a project distributed through package managers and git clones rather than through a registry, that absence carries less information than it would for a library, but it does mean you cannot read a changelog to work out what changed.
The install section assumes you are running a 2014-era plugin manager
Two statements have to be in your vimrc for the plugin to work fully, and the README is direct that most plugin managers do not add them for you:
syntax enable
filetype plugin indent onThe README advises putting these immediately after the plugin manager load section. That advice is the single most useful line on the page, and skipping it produces the classic symptom of a Rust file with no highlighting at all.
After that, the README offers six installation routes. The first is Vim 8 packages, which is the one to reach for if you have no plugin manager at all:
git clone https://github.com/rust-lang/rust.vim ~/.vim/pack/plugins/start/rust.vimThe rest are plugin manager declarations: Vundle uses `Plugin 'rust-lang/rust.vim'`, vim-plug uses `Plug 'rust-lang/rust.vim'`, dein.vim uses `call dein#add('rust-lang/rust.vim')`, NeoBundle uses `NeoBundle 'rust-lang/rust.vim'`, and Pathogen is given as a shallow clone into `~/.vim/bundle/rust.vim`.
Here is the observation worth making: six managers are documented and none of them is the widely used lazy.nvim. Every one of the listed approaches is a call your vimrc makes at startup, either a `git clone` into a directory or a single declarative line. That is a coherent set of choices for one era of Vim plugin management, and it is simply an older set than the current one. Nothing in the README has been updated to cover a manager that uses a different model, and the absence says nothing about whether the plugin loads under one. If your setup uses lazy.nvim, the `Plugin` or `Plug` line translates directly and the two vimrc statements above still apply, because those are the part that actually affects behaviour.
The README also covers help tags: run `:Helptags` and then `:help rust`, noting that plugin managers usually generate them but you should check your own manager's documentation.
Error checking goes through Syntastic, and the tree hints at more
The feature section names Syntastic as the integration point. The README states that rust.vim automatically registers `cargo` as a syntax checker with Syntastic when nothing else is specified, and points at `:help rust-syntastic` for details. In practice that means your editor asks cargo to compile the file and parses the diagnostics out of the compiler output, which is the oldest still-viable way to get Rust errors into Vim without a language server.
The repository tree complicates that picture slightly. Alongside `compiler/` and `syntax_checkers/` there is no `plugin/` registration for any other checker, and the README never mentions vim-lsp, ALE, or rust-analyzer by name. So the documented path is Syntastic, and if you have moved to a different checker you are on your own: there is no documented alternative, no adapter, and no note about what happens if both are configured.
That is the honest limitation of this project and it is a meaningful one. A compiler-based checker gives you errors, and it gives them well, because cargo emits machine-readable diagnostics. It will not give you completion, go-to-definition, inline type hints or rename. Those require a language server, and rust.vim is not in that business.
If you do use Syntastic, the configuration surface is `:help rust-syntastic`, which the README defers to rather than summarising. Given that the plugin has no releases, that help file inside `doc/` is the closest thing to versioned documentation, and it is worth reading if the checker misbehaves.
rustfmt on save and running one test at a time
These two features are where rust.vim earns its keep for a working Rust developer in Vim.
Formatting is the `:RustFmt` command, which runs `rustfmt` on the current buffer if it is installed. The README notes that rustfmt is installed through rustup as a component, and automatic formatting on save is switched on with a single global:
let g:rustfmt_autosave = 1Further options live behind `:help :RustFmt`. Worth knowing before you turn it on: the command shells out to a binary you must have, and the autosave option applies on every buffer save rather than on Rust files only, as written. If you work in a Vim with mixed file types, that is the detail to check first.
The second feature is `:RustTest`, which runs the test under the cursor. The README frames it exactly as intended: in a large project where running the whole suite takes a long time, running the one test you are editing is the difference between a usable feedback loop and a coffee break. It works in a Cargo project and infers the target from the cursor position.
Playpen integration is the third command, and it carries a dependency. `:RustPlay` sends the current selection, or the whole buffer if nothing is selected, to the Rust playpen, and the README flags in a note that this requires webapi-vim to be installed. If you want the resulting URL on the clipboard, set a command for it:
let g:rust_clip_command = 'xclip -selection clipboard'The Mac equivalent is `pbcopy`. This is the one feature that depends on a web round trip to play.rust-lang.org, so it is worth remembering it is sending code off the machine.
Tag browsing is recommended but not explained
The README's tag section recommends installing Tagbar together with Universal Ctags for a good source-browsing experience, and adds that for other kinds of setups rust.vim tries to configure Tagbar to some degree. That hedge is doing real work in the sentence, and it is the least resolved part of the documentation.
Here is what is missing. Universal Ctags needs a way to parse Rust, and the README does not say how it gets one, whether rust.vim ships a parser in its `ctags/` directory, or whether you are expected to have a Universal Ctags build with Rust support already. If your ctags binary has no Rust parser, Tagbar will populate and your jumps will be empty, with nothing in the plugin's documentation to explain why.
This is the kind of gap that costs an afternoon rather than a day, and the fix is diagnostic rather than investigative: install Universal Ctags, run it against a Rust file, and see whether it produces symbols. If it does not, the problem is your ctags build, not this plugin. The `ctags/` directory in the tree is a reasonable place to look for what the project thinks it is contributing here.
What is clear is the integration model. rust.vim is not a substitute for a tag generator; it configures how Tagbar and ctags cooperate for Rust files, and the quality of the result depends almost entirely on the quality of the ctags binary you installed yourself.
Two licence files against one licence field, and no release history
The repository page records the licence as Apache-2.0. The README says something different and more specific: like Rust itself, rust.vim is primarily distributed under the terms of both the MIT licence and the Apache License, Version 2.0, with a pointer to LICENSE-APACHE and LICENSE-MIT for details. Both files exist at the root of the tree.
Read that as a dual licence where you may choose either, which is the standard reading of both texts sitting side by side and of the phrase the project uses. The Apache-2.0 entry in the repository sidebar is the outlier, and it is the kind of field that reflects a classifier rather than a licensing decision. For a Vim plugin the practical stakes are low, since both licences are permissive and neither carries the copyleft obligations that would change how you distribute a config, but the discrepancy is real and worth resolving in favour of the files before you paste this into a corporate toolchain.
The absence of releases deserves the same plain statement. There are no GitHub releases for this project, so there is no version tag to pin against, no changelog to read and no upgrade notes. The README has no installation section that references a version either, so the only way to know what you have is the commit you cloned.
What you can do about that is straightforward. Clone the default branch, `main`, which was last pushed on 2026-10-02, and if you need reproducibility, pin to a commit hash in your lock file rather than to a tag. The `.vintrc.yml` and `triagebot.toml` files in the tree suggest the project is still linted and triaged rather than abandoned, which is a better signal of care than a version number would have been.
Editorial conclusion
rust.vim remains a working choice if you already live in Vim and want rustfmt plus a single-test command without wiring anything together. It is not a Rust IDE: there is no completion engine, no rename, and no LSP story anywhere in the documentation, and the error checking path depends on Syntastic. Set `let g:rustfmt_autosave = 1` and `syntax enable` first, since those are the two settings everything else assumes. Before adopting it on a new machine, check whether your plugin manager needs `filetype plugin indent on` set by hand, because the README states most managers do not do it, and if you rely on tag browsing, install Universal Ctags and confirm Rust symbols actually appear. The licence question resolves in your favour: both MIT and Apache-2.0 texts are in the tree.
Frequently asked questions
Does rust.vim provide code completion or go-to-definition?
No. The documented feature list is file detection, syntax highlighting, formatting with rustfmt, Syntastic error checking, Tagbar source browsing, playpen submission and running the test under the cursor. Completion and navigation require a language server, and the README names none.
What must be in my vimrc for rust.vim to work?
The README states that full functionality needs `syntax enable` and `filetype plugin indent on`, usually placed right after the plugin manager load section, because most managers do not add them automatically. Run `:Helptags` afterwards if you want `:help rust` to navigate.
How do I format Rust code automatically when saving in Vim?
Set `let g:rustfmt_autosave = 1` in your vimrc, which the README says enables automatic running of `:RustFmt` on buffer save. The command requires the rustfmt binary, installed as a rustup component, and `:help :RustFmt` documents further options.
Is rust.vim still maintained?
The repository is not archived and the last push was on 2026-10-02, and the tree includes linting configuration and a triage bot file. There are no published releases and no version tags, and the installation section documents six plugin managers without mentioning any newer ones, so activity and documentation freshness are not the same thing here.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/rust-lang-rust-vim)