rustaceanvim: rust-analyzer features Neovim's built-in LSP client does not ship
🦀 Supercharge your Rust experience in Neovim! A heavily modified fork of rust-tools.nvim
At a glance
- What is it?
- rustaceanvim is a Lua plugin that configures rust-analyzer for Neovim without lspconfig and adds non-standard rust-analyzer commands. It needs Neovim 0.12 or newer, and it is not the right first plugin for someone still learning Rust.
- Who is it for?
- Adopt rustaceanvim if you already run Neovim 0.12 or newer with rust-analyzer on PATH and you want rust-analyzer's non-standard features (debuggables, expandMacro, crate graphs, :Rustc unpretty) wired into a filetype plugin that needs no setup call. Do not adopt it if you are new to Rust, if you are pinned to an older Neovim, or if you already configure rust-analyzer through nvim-lspconfig, because the README warns that setting up the client manually may cause conflicts.
- Can I use it commercially?
- Yes, with conditions. GPL-2.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
- Is it still maintained?
- Yes. The repository last received commits 5 days ago.
- What is it written in?
- Mainly Lua, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 25, 2026, and from our analysis. They are not legal advice.
Editorial analysis
What rustaceanvim adds over Neovim's built-in LSP client
The README answers the adoption question before it explains anything else. If you are starting out with Rust, it says, Neovim's built-in LSP client API or nvim-lspconfig.rust_analyzer is probably enough, because those provide "the lowest common denominator of LSP support." rustaceanvim is aimed at people who want the non-standard features that are specific to rust-analyzer. That framing is honest and it is also the plugin's boundary: nothing here improves the quality of completion or diagnostics themselves, because those come from rust-analyzer. What the plugin does is expose the parts of rust-analyzer that do not travel over a plain LSP client, and configure the client so those parts are reachable. It is a heavily modified fork of rust-tools.nvim, and it sits on top of the same language server every other Rust editor setup uses. If your complaints are about rust-analyzer's analysis, this plugin will not fix them.
How rustaceanvim initialises without a setup call
The repository root contains an ftplugin directory and a lua directory, and the README describes the plugin as a filetype plugin that works out of the box. That layout is the mechanism: opening a Rust file triggers the ftplugin, which starts and configures the rust-analyzer client, rather than your init.lua calling a setup function. The README states there is no dependency on lspconfig and that lazy initialization is by design. There is a consequence that catches people. Because the plugin initialises when the filetype is set, the README carries an explicit warning not to set vim.g.rustaceanvim in after/ftplugin/rust.lua, since that file is sourced after the plugin is already initialized. Configuration belongs earlier, in the plugin spec or in init.lua. The same warning logic applies to the LSP client itself: the README says not to call the nvim-lspconfig.rust_analyzer setup or configure the rust-analyzer client manually, because doing so may cause conflicts. Two systems claiming the same client is the failure mode, not a subtle one.
Installing rustaceanvim and running the first :RustLsp command
Prerequisites come first. The README requires neovim >= 0.12 and rust-analyzer. Optional pieces are dot from graphviz for crate graphs, cargo for Cargo projects, a debug adapter such as lldb or codelldb plus nvim-dap for debugging, and a Rust tree-sitter parser for the :Rustc unpretty command. For Neovim's built-in plugin manager, the README gives this snippet, which also pins a version range to avoid surprise breaking changes:
vim.pack.add {{
src = 'https://github.com/mrcjkb/rustaceanvim',
-- To avoid being surprised by breaking changes,
-- I recommend you set a version range
version = vim.version.range('^9')
}}With lazy.nvim, the README's spec sets lazy = false and explains why: the plugin implements proper lazy-loading itself, so lazy.nvim should not try to defer it.
{
'mrcjkb/rustaceanvim',
version = '^9',
lazy = false,
}rocks.nvim users install it with a single command instead:
:Rocks install rustaceanvimAfter installation, open a Rust file. The README says the client is configured automatically, so completion and diagnostics should come from rust-analyzer without further action. The useful next step is a keymap, and the README suggests defining Rust-only mappings in ~/.config/nvim/after/ftplugin/rust.lua. Its example binds a code action command that supports rust-analyzer's grouping:
local bufnr = vim.api.nvim_get_current_buf()
vim.keymap.set(
"n",
"<leader>a",
function()
vim.cmd.RustLsp('codeAction') -- supports rust-analyzer's grouping
end,
{ silent = true, buffer = bufnr }
)The :RustLsp command surface and what each subcommand needs
The feature list is a set of subcommands under :RustLsp, and they do not all have the same prerequisites. Debugging is the clearest example: debuggables opens a prompt to select from available targets, while debug searches for a target at the current cursor position. Both take optional arguments, and the README shows the Lua equivalents vim.cmd.RustLsp('debug') and vim.cmd.RustLsp('debuggables'). Neither works without a debug adapter and nvim-dap, which the README lists as optional rather than required. Crate graphs need dot from graphviz. :Rustc unpretty needs a Rust tree-sitter parser. So the install surface is small but the working surface is conditional, and a new user who installs only the plugin and rust-analyzer will find a portion of the documented commands unavailable. The README points to doc/rustaceanvim.txt for the full command reference and to :h rustaceanvim.config for configuration, and there is a troubleshooting directory in the repository root for the cases that go wrong.
Where rustaceanvim is the wrong choice
The README's own advice is the strongest limitation: for someone starting out with Rust, the built-in LSP client or nvim-lspconfig.rust_analyzer is probably enough. Adding this plugin to a setup you do not yet understand makes debugging harder, because when something breaks you now have a filetype plugin, a language server and possibly a conflicting client configuration in play. The second boundary is the Neovim version. The README requires neovim >= 0.12 and notes that versions compatible with older Neovim releases are found in previous major version bumps in the changelog, so anyone on an older release has to move to an older major version of the plugin rather than the current one. The third is conflicts: if your configuration already calls nvim-lspconfig.rust_analyzer, the README warns that setting up the client manually may cause conflicts, and you should remove that path rather than run both. None of this is a defect. It is the cost of a plugin that takes over client initialization.
rustaceanvim compared with nvim-lspconfig.rust_analyzer
The real alternative named in the README is nvim-lspconfig.rust_analyzer, and the difference is not quality but scope. nvim-lspconfig provides a general configuration layer for many language servers, and its rust_analyzer entry gives you the standard LSP surface: completion, hover, diagnostics, go-to-definition. rustaceanvim does not depend on lspconfig at all and instead configures the rust-analyzer client itself, then layers rust-analyzer-specific commands on top of it. That means the two overlap in exactly the place where conflicts occur. If you want one configuration path for every language in your editor, lspconfig is the more consistent choice. If you want debuggables, crate graphs and the rest of the :RustLsp subcommands, rustaceanvim is the one that exposes them, and the README suggests sharing keymaps through vim.g.rustaceanvim.server.on_attach or an LspAttach autocommand if you keep lspconfig around for other languages. The README also links a migration discussion for people coming from rust-tools.nvim, which is the other realistic starting point.
Maintenance, licensing and upgrade cost
The last push to the default branch was on 2026-09-23, and the most recent tagged release listed is v9.2.1 from 2026-08-21, following v9.2.0 and v9.1.0 earlier in August. The repository is not archived. Releases arrive as tagged versions, and the README recommends pinning to them, which is the practical upgrade policy: set a version range such as '^9' and move deliberately rather than tracking main. The README's note about older Neovim versions living in previous major version bumps in the changelog is the other upgrade cost to plan for, since a major bump can be tied to a Neovim requirement rather than to a feature. The licence is GPL-2.0, and the repository root also carries a rust-tools.nvim-LICENSE file, which is consistent with the project being a fork of rust-tools.nvim. GPL-2.0 is a copyleft licence; if you redistribute the plugin or a modified version, the terms attach to that distribution. That is a statement about the licence identifier, not legal advice, and anyone embedding the code in a distributed product should read the LICENSE file themselves.
Editorial conclusion
Adopt rustaceanvim if you already run Neovim 0.12 or newer with rust-analyzer on PATH and you want rust-analyzer's non-standard features (debuggables, expandMacro, crate graphs, :Rustc unpretty) wired into a filetype plugin that needs no setup call. Do not adopt it if you are new to Rust, if you are pinned to an older Neovim, or if you already configure rust-analyzer through nvim-lspconfig, because the README warns that setting up the client manually may cause conflicts. Before installing, check two things: your Neovim version, and whether any existing config calls nvim-lspconfig.rust_analyzer. Then pin a version range such as '^9' rather than tracking the main branch, since the README says tagged releases exist to avoid breaking changes.
Frequently asked questions
Is there a Rust LSP plugin for Neovim?
Yes. rustaceanvim configures the rust-analyzer builtin LSP client automatically and adds rust-analyzer-specific commands on top. The README notes that Neovim's built-in LSP client and nvim-lspconfig.rust_analyzer are probably enough if you are starting out with Rust.
How to install rustaceanvim?
With rocks.nvim it is :Rocks install rustaceanvim. With Neovim's built-in plugin manager or lazy.nvim you add the plugin from https://github.com/mrcjkb/rustaceanvim and pin a version range such as '^9'. The prerequisites are neovim >= 0.12 and rust-analyzer.
Which Rust LSP should I use with rustaceanvim?
rustaceanvim is built around rust-analyzer, which the README lists as a required prerequisite. It does not configure any other Rust language server.
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/mrcjkb-rustaceanvim)