Install
git clone https://github.com/coder/claudecode.nvimInstall command taken from the project's README or registry entry. Always review code before running it.
README excerpt
Read full README on GitHub →claudecode.nvim
The first Neovim IDE integration for Claude Code — bringing Anthropic's AI coding assistant to your favorite editor with a pure Lua implementation.
🎯 TL;DR: When Anthropic released Claude Code with VS Code and JetBrains support, I reverse-engineered their extension and built this Neovim plugin. This plugin implements the same WebSocket-based MCP protocol, giving Neovim users the same AI-powered coding experience.
https://github.com/user-attachments/assets/9c310fb5-5a23-482b-bedc-e21ae457a82d
What Makes This Special
When Anthropic released Claude Code, they only supported VS Code and JetBrains. As a Neovim user, I wanted the same experience — so I reverse-engineered their extension and built this.
- 🚀 Pure Lua, Zero Dependencies — Built entirely with
vim.loopand Neovim built-ins - 🔌 100% Protocol Compatible — Same WebSocket MCP implementation as official extensions
- 🎓 Fully Documented Protocol — Learn how to build your own integrations (see PROTOCOL.md)
- ⚡ First to Market — Beat Anthropic to releasing Neovim support
- 🛠️ Built with AI — Used Claude to reverse-engineer Claude's own protocol
Installation
{
"coder/claudecode.nvim",
dependencies = { "folke/snacks.nvim" },
config = true,
-- `cmd` lets lazy.nvim create command stubs that load the plugin on first use,
-- so `:ClaudeCode` and friends work on a fresh start. Without it, a keys-only
-- spec defers loading until a <leader>a* mapping is pressed and the commands
-- would not exist yet.
cmd = {
"ClaudeCode",
"ClaudeCodeFocus",
"ClaudeCodeSelectModel",
"ClaudeCodeAdd",
"ClaudeCodeSend",
"ClaudeCodeTreeAdd",
"ClaudeCodeStatus",
"ClaudeCodeStart",
"ClaudeCodeStop",
"ClaudeCodeOpen",
"ClaudeCodeClose",
"ClaudeCodeDiffAccept",
"ClaudeCodeDiffDeny",
"ClaudeCodeCloseAllDiffs",
},
keys = {
{ "<leader>a", nil, desc = "AI/Claude Code" },
{ "<leader>ac", "<cmd>ClaudeCode<cr>", desc = "Toggle Claude" },
{ "<leader>af", "<cmd>ClaudeCodeFocus<cr>", desc = "Focus Claude" },
{ "<leader>ar", "<cmd>ClaudeCode --resume<cr>", desc = "Resume Claude" },
{ "<leader>aC", "<cmd>ClaudeCode --continue<cr>", desc = "Continue Claude" },
{ "<leader>am", "<cmd>ClaudeCodeSelectModel<cr>", desc = "Select Claude model" },
{ "<leader>ab", "<cmd>ClaudeCodeAdd %<cr>", desc = "Add current buffer" },
{ "<leader>as", "<cmd>ClaudeCodeSend<cr>", mode = "v", desc = "Send to Claude" },
{
"<leader>as",
"<cmd>ClaudeCodeTreeAdd<cr>",
desc = "Add file",
ft = { "NvimTree", "neo-tree", "oil", "minifiles", "netrw", "snacks_picker_list" },
},
-- Diff management
{ "<leader>aa", "<cmd>ClaudeCodeDiffAccept<cr>", desc = "Accept diff" },
{ "<leader>ad", "<cmd>ClaudeCodeDiffDeny<cr>", desc = "Deny diff" },
},
}
That's it! The plugin will auto-configure everything else.
Lazy-loading: with this spec the plugin loads on first use — when a listed
cmdis run or a mapped key is pressed — not at startup. Thecmdlist is what makes:ClaudeCode(and the other commands below) available before any keymap is pressed. If you would rather load the plugin eagerly at startup, setlazy = false(thecmd/keystriggers then become optional).
Requirements
Similar plugs
Multi-harness agentic plugin marketplace for Claude Code, Codex, Cursor, OpenCode, GitHub Copilot, Google Antigravity, and Pi
The Developer Tool for Visual Engineers • An Open-Source AI-First Design tool • Visually build, style, and edit your code with AI • World's best, top-most agent recommended #1…
A powerful GUI app and Toolkit for Claude Code - Create custom agents, manage interactive Claude Code sessions, run secure background agents, and more.