Neovim as a Rust IDE: worth the migration?

On this page

Skip to content

    Overview

    VS Code is the default Rust IDE. It works out of the box, has excellent rust-analyzer integration, and supports debugging, testing, and cargo commands through a polished UI. Neovim requires configuration, but delivers faster startup, lower memory usage, and a workflow that scales with your muscle memory.

    This is a report on migrating a 12-crate Rust workspace from VS Code to Neovim over six weeks.

    The Setup

    The minimal Neovim Rust setup requires:

    • rust-analyzer — LSP server for completions, diagnostics, and go-to-definition
    • nvim-treesitter — For syntax highlighting and text object recognition
    • nvim-lspconfig — LSP configuration and management
    • mason.nvim — Package manager for LSP servers and tools
    • dap-rs — Debug Adapter Protocol support for Rust debugging
    • cargo-nextest — Test runner integration

    The configuration is approximately 400 lines of Lua. It’s not a dotfile project — it’s a small configuration that you maintain.

    What Works Better

    Startup time. Neovim starts in ~80ms. VS Code takes ~2-3 seconds on the same machine. For a language server that needs to index a workspace, the difference compounds: rust-analyzer starts faster in Neovim because there’s no extension host overhead.

    Navigation speed. gf (go to file), ]d/[d (next/previous diagnostic), and gD (go to definition) are all one keystroke. In VS Code, these are either multi-key shortcuts or require reaching for the mouse on a trackpad.

    Memory usage. Neovim with the full Rust setup uses ~60MB. VS Code with Rust extension pack uses ~400MB. This matters when you have 15 tabs open and a browser with 50 tabs.

    What Doesn’t Work

    Debugging. DAP in Neovim works but requires manual configuration of launch.json equivalents in Lua. The UI is terminal-based — no variable hover, no call stack visualization. VS Code’s debugger UI is significantly more polished.

    Testing. Running cargo test in Neovim requires a plugin and custom keybindings. VS Code has a built-in Test Explorer that shows pass/fail status with a click.

    Crate management. cargo add, cargo update, and cargo audit are all terminal commands. Neovim doesn’t have a built-in crate management UI. VS Code’s Cargo extension provides a GUI for these operations.

    The Cognitive Cost

    The first two weeks were frustrating. Every task that was trivial in VS Code required looking up the Neovim equivalent. :LspReferences instead of F12. :Telescope live_grep instead of Ctrl+Shift+F. :Mason instead of Extensions panel.

    By week three, the muscle memory started to form. By week four, I was faster than I was in VS Code for the tasks I do most: navigating code, searching, refactoring, and reading diagnostics.

    Verdict

    If you write Rust professionally and spend more than 4 hours a day in your editor, the migration is worth it. The speed advantage compounds over time. If you write Rust occasionally or prefer a GUI, stick with VS Code. The cognitive cost of Neovim is real, and not everyone has the patience to pay it.