User ClaudeCodeSendCompleteautocmd, fired once per file when a send is accepted while Claude is connected, withdata = { file_path, start_line, end_line, context }(lines 0-indexed). Lets you run arbitrary post-send logic — in particular, focus a Claude session running outside Neovim (provider = "none"/"external"), e.g. viatmux select-pane, whichfocus_after_sendcannot do. (#228):ClaudeCodeCloseAllDiffscommand to close pending Claude diffs at once (e.g. proposals orphaned by resolving them via Claude remote control). A diff you accepted with:wcloses once the file holds the accepted text. When the file does not hold it yet, the command puts the text into the file's buffer as unsaved changes, for:wor:e!, so accepted edits are never discarded. (#248):ClaudeCodeSendText {text}command (andrequire("claudecode.terminal").send_to_terminal(text, opts)function) to send arbitrary text to the open Claude terminal as if typed at the prompt, submitting it by default.:ClaudeCodeSendText!inserts the text without submitting. Handy for scripting and keymaps; multi-line text is sent via bracketed paste. Works with the in-editornative/snacksproviders only —external/nonerun Claude outside Neovim, where there is no pane to write to. (#197)terminal.auto_insertoption (defaulttrue) controlling whether the Claude terminal auto-enters insert/terminal mode when its window gains focus. With the default Snacks provider, switching back into the terminal window (e.g.<C-w>l) previously re-entered terminal mode and jumped to the bottom prompt, discarding your Normal-mode scroll/reading position; setauto_insert = falseto stay in Normal mode and preserve the scroll position (pressito type). Applies to thenativeandsnacksproviders and the new-tab diff terminal. (#232, #145)diff_opts.layout = "unified": a unified diff rendered in a single buffer with deleted (red/strikethrough) and added (green) lines interleaved, as a compact alternative to the two-pane"vertical"/"horizontal"layouts. Requires Neovim >= 0.9.0; theClaudeCodeInlineDiffAdd/Delete/AddSign/DeleteSignhighlight groups are customizable. (#82, #195, #293)
- The native terminal provider now adopts only terminal buffers it started, which it marks with
b:claudecode_native_terminal. Before,:ClaudeCode,:ClaudeCodeFocus, and:ClaudeCodeOpenadopted any visible terminal whose name containedclaude, for example a shell started inside aclaudecode.nvimcheckout. Upgrade note: a terminal that an older plugin version started (for example after:Lazy reloadfollowing an upgrade), or that a session file restored, carries no mark and is no longer adopted. The next open starts a second Claude session, and the old terminal keeps running until you close its buffer or quit Claude in it. (#349) closeAllDiffTabsno longer destroys diffs it does not own. It previously closed every window with&diffset and force-deleted any buffer named like*.diff/diff:///fugitive://, so an open diffview.nvim, fugitive, or native:diffsplitreview was wiped out — and because the Claude CLI calls this tool at the start of every turn, it happened on essentially every prompt. The tool is now scoped to claudecode's own tracked diffs (matching the official VS Code extension, which only closes the tabs it labelled). Relatedly,openFile/openDiffno longer reuse a window that is in diff mode, which previously:edit-ed over one side of an unrelated diff and broke its layout. (#277)- The Claude terminal now adds the loopback hosts (
localhost,127.0.0.1,::1) tono_proxy/NO_PROXY, so a configuredhttp_proxy/all_proxyno longer tunnels Claude'sws://127.0.0.1IDE connection and causes queued @ mentions to time out. Existingno_proxyexclusions are preserved. (#70) focus_after_send = trueno longer fails silently withterminal.provider = "none"/"external": those providers run Claude outside Neovim, so focus cannot move there. A one-time warning is now emitted at setup pointing to the newUser ClaudeCodeSendCompleteautocmd, which you can hook to focus your own terminal. (focus_after_sendstill only auto-focuses the in-editor providers.) (#228)- Rejecting a Claude diff with
:q(or:close/<C-w>c/ closing the tab) now resolves it as rejected, matching the documented behavior. The proposed buffer is a scratch buffer that:qonly hides, so the existingBufDelete/BufUnload/BufWipeoutautocmds never fired; aWinClosedautocmd now handles window-close rejection. (#238) - Push quickly-made visual selections to Claude reliably. Selections made and released faster than the selection-tracking debounce were never broadcast, and any selection was wiped shortly after leaving visual mode when Claude runs in an external terminal (the
/ideflow) — so single-line selections in particular often never reached Claude. Selections are now flushed synchronously on visual-mode exit (from the'</'>marks) and persist until the cursor actually moves; a single-line linewiseVmade right after a charwise selection is also no longer mis-extracted to a single character. (#246) - Diffs opened via
openDiffno longer linger forever when they are resolved outside this Neovim or their Claude session goes away. Pending diffs are now automatically closed when the client that opened them disconnects or the integration is stopped, andcloseAllDiffTabsnow also resolves/cleans the diff module's tracked state instead of only closing windows. (#248) - Show diffs when the Claude Code terminal is the only window (no other splits). Previously
openDifffailed with "No suitable editor window found"; now a split is created to host the diff, matching the behavior of theopenFiletool. (#231) - Fix the "climbing cursor" in the Snacks terminal: hiding and re-showing the Claude panel no longer leaves the cursor one row above the prompt (so typed text lands on the wrong line). The Snacks provider now hides/shows without destroying the window — floats are parked via
nvim_win_set_config({hide=...})and splits are recreated like the native provider — which preserves the cursor anchor Claude re-renders against on focus-in. Splits are fixed on all supported Neovim versions; the float fix requires Neovim >= 0.10. (#240, #183) - Work around a Neovim core bug (< 0.12.2) that fragmented large bracketed pastes into the terminal across
vim.pastephases, making Cmd+V appear to truncate content. Added a scoped, version-gatedvim.pasteshim controlled byterminal.fix_streamed_paste("auto"by default; no-op on Neovim >= 0.12.2). (#161)
-
External terminal provider to run Claude in a separate terminal (#102)
-
Terminal provider APIs: implement
ensure_visiblefor reliability (#103) -
Working directory control for Claude terminal (#117)
-
Support function values for
external_terminal_cmdfor dynamic commands (#119) -
Add
"none"terminal provider option for external CLI management (#130) -
Shift+Enter keybinding for newline in terminal input (#116)
-
focus_after_sendoption to control focus after sending to Claude (#118) -
Snacks:
snacks_win_optsto overrideSnacks.terminal.open()options (#65) -
Terminal/external quality: CWD support, stricter placeholder parsing, and
jobstartCWD (commit e21a837) -
Diff UX redesign with horizontal layout and new tab options (#111)
-
Prevent diff on dirty buffers (#104)
-
keep_terminal_focusoption for diff views (#95) -
Control behavior when rejecting “new file” diffs (#114)
-
Add Claude Haiku model + updated type annotations (#110)
-
CLAUDE_CONFIG_DIRenvironment variable support (#58) -
PartialClaudeCodeConfigtype for safer partial configs (#115) -
Generalize format hook; add floating window docs (commit 7e894e9)
-
Add env configuration option; fix
vim.notifyscheduling (#21) -
WebSocket authentication (UUID tokens) for the server (#56)
-
MCP tools compliance aligned with VS Code specs (#57)
- Wrap ERROR/WARN logging in
vim.scheduleto avoid fast-event context errors (#54) - Native terminal: do not wipe Claude buffer on window close (#60)
- Native terminal: respect
auto_closebehavior (#63) - Snacks integration: fix invalid window with
:ClaudeCodeFocus(#64) - Debounce update on selection for stability (#92)
- Update PROTOCOL.md with complete VS Code tool specs; streamline README (#55)
- Convert configuration examples to collapsible sections; add community extensions (#93)
- Local and native binary installation guide (#94)
- Auto-save plugin note and fix (#106)
- Add AGENTS.md and improve config validation notes (commit 3e2601f)
- Centralize type definitions in dedicated
types.luamodule (#108) - Devcontainer with Nix support; follow-up simplification (#112, #113)
- Add Neovim test fixture configs and helper scripts (commit 35bb60f)
- Update Nix dependencies and documentation formatting (commit a01b9dc)
- Debounce/Claude hooks refactor (commit e08921f)
- @alvarosevilla95 — first contribution in #60
- @qw457812 — first contribution in #64
- @jdurand — first contribution in #89
- @marcinjahn — first contribution in #102
- @proofer — first contribution in #98
- @ehaynes99 — first contribution in #106
- @rpbaptist — first contribution in #92
- @nerdo — first contribution in #78
- @totalolage — first contribution in #21
- @TheLazyLemur — first contribution in #18
- @nabekou29 — first contribution in #58
- Diagnostics Integration: Added comprehensive diagnostics tool that provides Claude with access to LSP diagnostics information (#34)
- File Explorer Integration: Added support for oil.nvim, nvim-tree, and neotree with @-mention file selection capabilities (#27, #22)
- Enhanced Terminal Management:
- Customizable Diff Keymaps: Made diff keymaps adjustable via LazyVim spec (#47)
- Terminal Focus: Fixed terminal focus error when buffer is hidden (#43)
- Diff Acceptance: Improved unified diff acceptance behavior using signal-based approach instead of direct file writes (#41)
- Syntax Highlighting: Fixed missing syntax highlighting in proposed diff view (#32)
- Visual Selection: Fixed visual selection range handling for
:'\<,'\>ClaudeCodeSend(#26) - Native Terminal: Implemented
bufhidden=hidefor native terminal toggle (#39)
- Testing Infrastructure: Moved test runner from shell script to Makefile for better development experience (#37)
- CI/CD: Added Claude Code GitHub Workflow (#2)
First public release of claudecode.nvim - the first Neovim IDE integration for Claude Code.
- Pure Lua WebSocket server (RFC 6455 compliant) with zero dependencies
- Full MCP (Model Context Protocol) implementation compatible with official extensions
- Interactive terminal integration for Claude Code CLI
- Real-time selection tracking and context sharing
- Native Neovim diff support for code changes
- Visual selection sending with
:ClaudeCodeSendcommand - Automatic server lifecycle management
:ClaudeCode- Toggle Claude terminal:ClaudeCodeSend- Send visual selection to Claude:ClaudeCodeOpen- Open/focus Claude terminal:ClaudeCodeClose- Close Claude terminal
- Neovim >= 0.8.0
- Claude Code CLI