Skip to content

Neovim for Rustλ︎

Neovim provides excellent syntax support via the Treesiter parser for rust.

rust-analyzer provides an LSP server that returns diagnostics to the Neovim LSP Client and/or rustaceanvim

rustaceanvim provides extensive features for rust development and integrates with LSP clients.

Add Astrocommunity Rust Pack

  { import = "astrocommunity.pack.rust" },

Rust support provided via the Astrocommunity Rust pack

  • rust Treesitter parser
  • LSP support via rust-analyzer & cargo clippy
  • DAP (debug) via codelldb (mason installl)
  • rustaceanvim for rust specific tooling via rust-analyzer
  • crates.nvim for crate management and completion
  • TOML language support
  • neotest is a Neovim framework for test runners, i.e. rustaceanvim.neotest

rust-analyzer shold be added via the rustup tool

Install rust-analyzer via rustup

rustup component add rust-analyzer
❯ rustup component add rust-analyzer
info: downloading component 'rust-analyzer'
info: installing component 'rust-analyzer'