Skip to main content
Back to Extensions Directory
coc.nvim fallback icon

coc-rust-analyzer

Heyward Fann

rust-analyzer for Vim/Neovim, works as an extension with coc.nvim

Installation CommandVim prompt
:CocInstall coc-rust-analyzer
GitHub owner
Heyward Fann
Version
v0.89.2
Requirements
coc ^0.0.80
License
MIT
Repository
GitHub
npm latest published 2026-07-01Registry checked 2026-08-23Registry summary

Published Package Summary

coc-rust-analyzer

GitHub Sponsors Patreon donate button PayPal donate button

rust-analyzer for Vim/Neovim, works as an extension with coc.nvim.

10

Install

:CocInstall coc-rust-analyzer

remove rust-analyzer config from coc-settings.json if you've set

Notes

It's recommended to add $CARGO_HOME to workspace.ignoredFolders to stop rust-analyzer runs cargo check on sysroot crates:

"workspace.ignoredFolders": [
  "$HOME",
  "$HOME/.cargo/**",
  "$HOME/.rustup/**"
],

Configurations

This extension is configured using a jsonc file. You can open this configuration file using the command :CocConfig, and it is typically located at $HOME/.config/nvim/coc-settings.json. You can get the configurations list from the package.json file of this extension.

Debugging with Vimspector

To debug Rust runnables with Vimspector, set the debug runtime in coc-settings.json:

{
  "rust-analyzer.debug.runtime": "vimspector"
}

Install Vimspector and the CodeLLDB adapter with :VimspectorInstall CodeLLDB. Then add a Vimspector configuration, either in the project root as .vimspector.json or in a global Vimspector configuration file:

{
  "$schema": "https://puremourning.github.io/vimspector/schema/vimspector.schema.json",
  "configurations": {
    "launch": {
      "adapter": "CodeLLDB",
      "configuration": {
        "request": "launch",
        "program": "${Executable}",
        "args": ["*${Args}"]
      }
    }
  }
}

The launch key must match rust-analyzer.debug.vimspector.configuration.name, which defaults to launch. :CocCommand rust-analyzer.debug passes Executable and Args to Vimspector for the selected runnable.

License

MIT


This extension is built with create-coc-extension

Read the complete README
  • rust-analyzer for Vim/Neovim, works as an extension with coc.nvim
Activation Events
  • onLanguage:rust
Developer Resources

Want to build, test, or contribute to coc.nvim extensions? Explore our official SDK and testing toolkits.

Open Developer Guide

Version History

This published npm package does not include a history.md or changelog.md file. Browse its npm versions or repository releases for available release information.