claudecode.nvim plugin

Neovim plugin that connects Claude Code to the editor: current file, selection, diagnostics and diff review of proposed edits

  • 3,152 ★ on the repository
  • Last commit
  • MIT
Plugin

Extended access

Why this level

  • The plugin opens a local WebSocket server through which Claude Code reads files and selections from Neovim
  • The agent can open files in the editor and propose edits, and you accept them
All reasons and checks
Needs a VPN

coder/claudecode.nvim

Install

Works in

Manual install

Text for your agent

Add the `coder/claudecode.nvim` spec to the lazy.nvim configuration with the `folke/snacks.nvim` dependency and `config = true`, and list the `ClaudeCode`, `ClaudeCodeFocus`, `ClaudeCodeSend` and `ClaudeCodeAdd` commands in `cmd`. Make sure `claude` is on the PATH Neovim sees, otherwise set `terminal_cmd`. Then run `:ClaudeCode`.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The plugin opens a local WebSocket server through which Claude Code reads files and selections from Neovim
  • The agent can open files in the editor and propose edits, and you accept them

This is third-party code. Review the repository files before installing.

What it does

claudecode.nvim is a pure Lua Neovim plugin that links the editor to Claude Code over the same WebSocket-based MCP protocol the official VS Code and JetBrains extensions use. The `:ClaudeCode` command opens Claude Code in a terminal inside Neovim. The agent sees the current file and selection, gets diagnostics and workspace information, and opens files in the editor itself. When Claude Code proposes an edit, the plugin shows it in the regular Neovim diff. You accept by saving the file (`:w`) or with `<leader>aa`, and reject with `:q` or `<leader>ad`. You can edit the proposal before accepting. A visual selection goes to the agent with `:ClaudeCodeSend`, a file joins the context with `:ClaudeCodeAdd`, and in file trees (nvim-tree, neo-tree, oil.nvim, mini.nvim) the same `<leader>as` key adds the file under the cursor.

Who it is for. For developers who work in Neovim and want to drive Claude Code next to their code without switching to VS Code or JetBrains.

Good fit when

  • You write code in Neovim and want Claude Code to see the open file and selected lines without pasting into a terminal
  • You want to review agent edits in the familiar Neovim diff and accept them by saving the file
  • Claude Code runs in a separate terminal or tmux and Neovim should attach to it as an IDE (`none` or `external` provider)
  • You want to send a file from nvim-tree, neo-tree or oil.nvim to the agent with one key

Not a fit when

  • You work in VS Code or JetBrains, where Claude Code has its own extensions
  • You need another agent such as Codex or Gemini CLI: the plugin speaks the Claude Code protocol
  • Your Neovim is older than 0.8, the lowest version the plugin lists
  • You want a multi-provider model chat inside Neovim, which codecompanion.nvim covers better

Example request

Look at the diagnostics in the open file and propose a fix, I will review it in the diff

Limitations

The plugin is in beta. It needs Neovim 0.8 or newer, the Claude Code CLI and folke/snacks.nvim for terminal handling. If Claude Code moved to a local install (`claude migrate-installer`), set the binary path in the `terminal_cmd` option. The plugin updates like any lazy.nvim plugin, and changes are tracked in `CHANGELOG.md`.

How to disable. Remove the plugin spec from your lazy.nvim configuration and restart Neovim. `:ClaudeCodeStop` stops the integration server without removing the plugin.

FAQ

How do I connect Claude Code to Neovim?

Add `coder/claudecode.nvim` to lazy.nvim together with the `folke/snacks.nvim` dependency and run `:ClaudeCode`. The plugin starts its own WebSocket server and sets up the connection.

How do I accept or reject a Claude Code edit in Neovim?

Save the file with `:w` or press `<leader>aa` to accept. Close the window with `:q` or press `<leader>ad` to reject. You can change the proposed text before accepting.

What if Claude Code is installed locally through migrate-installer?

Set the binary path in the `terminal_cmd` option, for example `~/.claude/local/claude`. Neovim does not see shell aliases, so without the path the `claude` command is not found.

How does the plugin differ from running claude in a Neovim terminal?

The plugin adds two-way communication: the agent receives your selection, current file and diagnostics, and edits open in the editor diff. A plain terminal passes none of that to the agent.

How do I stop the integration without removing the plugin?

Run `:ClaudeCodeStop`: it stops the integration server.

Discussion

No questions or reviews yet.

Plugins

CodeCompanion.nvim

codecompanion.nvim

A Neovim AI assistant with LLM chat and Claude Code, Codex, Gemini CLI running right inside the editor via ACP and MCP

PluginExtended access6.9KRepository stars

A file tree plugin for Claude Code that highlights the files the agent reads and edits, with git status, diffs and a preview

PluginExtended access377Repository stars

A JetBrains IDE plugin with a graphical Claude Code chat: tool cards, session tabs and a browser mode

PluginBroad access299Repository stars

A Claude Code plugin marketplace by Frad LEE: Git and GitFlow, GitHub, refactoring, memory, research, image generation and interface work

PluginExtended access596Repository stars

A debugging tool for Claude Code that reads the session logs already saved on disk and shows exact file paths, diffs, model thinking and a category-by-category

CLIExtended access4KRepository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialRepository starsMain difference
claudecode.nvim (this card)no3,152
CodeCompanion.nvimno6,924a multi-model chat inside Neovim with Claude Code as one provider
MCP Hubno1,789manages MCP servers for Neovim chat plugins

README in short

The integration protocol is documented separately in `PROTOCOL.md`. It installs through lazy.nvim, then the `:ClaudeCode*` commands and `<leader>a` key maps take over. Separate sections cover local Claude Code installs, `User` autocmd events and troubleshooting.

README badge

Report a problem

Foxx AIclaudecode.nvim
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.