|
2 | 2 |
|
3 | 3 | ## [Unreleased] |
4 | 4 |
|
5 | | -### Features |
6 | | - |
7 | | -- `User ClaudeCodeSendComplete` autocmd, fired once per file when a send is accepted while Claude is connected, with `data = { 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. via `tmux select-pane`, which `focus_after_send` cannot do. ([#228](https://github.com/coder/claudecode.nvim/issues/228)) |
8 | | -- `:ClaudeCodeCloseAllDiffs` command to close pending Claude diffs at once (e.g. proposals orphaned by resolving them via Claude remote control). Diffs you have already accepted but whose file has not been written yet are left intact so saved edits are never discarded. ([#248](https://github.com/coder/claudecode.nvim/issues/248)) |
9 | | -- `:ClaudeCodeSendText {text}` command (and `require("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-editor `native`/`snacks` providers only — `external`/`none` run Claude outside Neovim, where there is no pane to write to. ([#197](https://github.com/coder/claudecode.nvim/issues/197)) |
| 5 | +## [0.4.0] - 2026-06-22 |
| 6 | + |
| 7 | +### Added |
| 8 | + |
| 9 | +- `:ClaudeCodeSendText {text}` command and `require("claudecode.terminal").send_to_terminal(text, opts)` to send arbitrary text to the open Claude terminal as if typed at the prompt. `:ClaudeCodeSendText!` inserts without submitting; multi-line text is sent via bracketed paste. In-editor providers (`native`/`snacks`) only ([#272](https://github.com/coder/claudecode.nvim/pull/272)). |
| 10 | +- `:ClaudeCodeCloseAllDiffs` command to close all pending Claude diffs at once ([#261](https://github.com/coder/claudecode.nvim/pull/261)). |
| 11 | +- `:checkhealth claudecode` health check covering Neovim version, `setup()`, Claude CLI resolution, terminal provider, WebSocket server, lock file, and live connection state ([#275](https://github.com/coder/claudecode.nvim/pull/275)). |
| 12 | +- `User ClaudeCodeSendComplete` autocmd, fired once per file when a send is accepted while Claude is connected, with `data = { file_path, start_line, end_line, context }` (lines 0-indexed). Lets you focus a Claude session running outside Neovim (e.g. via `tmux select-pane`) ([#265](https://github.com/coder/claudecode.nvim/pull/265)). |
| 13 | +- `User ClaudeCodeDiffOpened` / `ClaudeCodeDiffClosed` autocmds with diff metadata payloads, plus `diff_opts.auto_resize_terminal` (opt-out of plugin-managed terminal width) and `terminal.diff_split_width_percentage` (separate terminal width while a diff is open) ([#270](https://github.com/coder/claudecode.nvim/pull/270)). |
| 14 | +- netrw file selection support for `<leader>as` / `:ClaudeCodeTreeAdd`, including marked and cursor files ([#62](https://github.com/coder/claudecode.nvim/pull/62)). |
| 15 | +- snacks.nvim picker support for `:ClaudeCodeTreeAdd` — add selected/highlighted files from `Snacks.explorer()` and `Snacks.picker` to Claude's context ([#269](https://github.com/coder/claudecode.nvim/pull/269)). |
| 16 | +- `terminal.fix_streamed_paste` option (default `"auto"`) to work around Neovim < 0.12.2 terminal paste fragmentation ([#252](https://github.com/coder/claudecode.nvim/pull/252)). |
| 17 | + |
| 18 | +### Changed |
| 19 | + |
| 20 | +- Modernized the `:ClaudeCodeSelectModel` picker: evergreen version-free labels (`Claude Opus (Latest)`, etc.), added 1M-context variants (`opus[1m]`, `sonnet[1m]`) and a `Default (account recommended)` option ([#256](https://github.com/coder/claudecode.nvim/pull/256)). |
| 21 | +- Hardened IDE auth: the WebSocket token is now generated from a CSPRNG and the lock file is written atomically with `0600` permissions in a `0700` directory (previously world-readable) ([#259](https://github.com/coder/claudecode.nvim/pull/259)). |
| 22 | + |
| 23 | +### Fixed |
| 24 | + |
| 25 | +- `closeAllDiffTabs` no longer destroys diffs it does not own (diffview.nvim, fugitive, native `:diffsplit`). It is now scoped to claudecode's own tracked diffs, and `openFile`/`openDiff` no longer reuse or `:edit` into a window that is in diff mode ([#277](https://github.com/coder/claudecode.nvim/pull/277), [70a1438](https://github.com/coder/claudecode.nvim/commit/70a1438)). |
| 26 | +- The Claude terminal now adds loopback hosts (`localhost`, `127.0.0.1`, `::1`) to `no_proxy`/`NO_PROXY`, so a configured proxy no longer tunnels Claude's `ws://127.0.0.1` IDE connection and times out queued @ mentions. Existing exclusions are preserved ([#268](https://github.com/coder/claudecode.nvim/pull/268)). |
| 27 | +- Rejecting a Claude diff with `:q` / `:close` / `<C-w>c` / tab close now resolves it as rejected via a new `WinClosed` autocmd ([#266](https://github.com/coder/claudecode.nvim/pull/266)). |
| 28 | +- Quickly-made and single-line visual selections are now pushed to Claude reliably: selections are flushed synchronously on visual-mode exit and persist until the cursor moves ([#267](https://github.com/coder/claudecode.nvim/pull/267)). |
| 29 | +- Diffs opened via `openDiff` are now auto-closed when the client that opened them disconnects or the integration stops, instead of lingering forever ([#261](https://github.com/coder/claudecode.nvim/pull/261)). |
| 30 | +- Diffs now open when the Claude terminal is the only window, instead of failing with "No suitable editor window found" ([#260](https://github.com/coder/claudecode.nvim/pull/260)). |
| 31 | +- A stranded empty tab is no longer left behind when `open_in_new_tab` diff setup errors before registration ([#264](https://github.com/coder/claudecode.nvim/pull/264)). |
| 32 | +- Fixed the Snacks terminal "climbing cursor": hiding and re-showing the panel no longer leaves the cursor one row above the prompt. Floats are parked via `nvim_win_set_config({hide=...})` (Neovim >= 0.10); splits are recreated like the native provider (all versions) ([#271](https://github.com/coder/claudecode.nvim/pull/271)). |
| 33 | +- `keep_terminal_focus = true` now works for floating Claude terminals when opening a diff ([#178](https://github.com/coder/claudecode.nvim/pull/178)). |
| 34 | +- Excluded the Snacks Explorer layout box (`snacks_layout_box`) and picker list from main-editor-window detection so diffs no longer corrupt the explorer sidebar ([#255](https://github.com/coder/claudecode.nvim/pull/255), [#165](https://github.com/coder/claudecode.nvim/pull/165)). |
| 35 | +- Legacy `diff_opts.vertical_split` and `open_in_current_tab` options now apply correctly again (were ignored due to merge order) ([#142](https://github.com/coder/claudecode.nvim/pull/142)). |
| 36 | +- `getDiagnostics` now accepts a bare file path without a `file://` URI scheme, matching what Claude sends ([#163](https://github.com/coder/claudecode.nvim/pull/163)). |
| 37 | +- IDE tool responses now return grouped URI-based diagnostics with editor-native ranges, stop advertising an unsupported resources capability, and harden background file opens ([#274](https://github.com/coder/claudecode.nvim/pull/274)). |
| 38 | +- `ClaudeCodeAdd` and `openFile` now handle `$` in file paths ([#286](https://github.com/coder/claudecode.nvim/pull/286)). |
| 39 | +- `:ClaudeCodeSend` now classifies tree/explorer buffers by filetype only, so an ordinary file whose path contains `neo-tree`/`NvimTree` is no longer misrouted ([#292](https://github.com/coder/claudecode.nvim/pull/292)). |
| 40 | +- `focus_after_send = true` now emits a one-time warning with `provider = "none"`/`"external"` instead of silently doing nothing ([#265](https://github.com/coder/claudecode.nvim/pull/265)). |
| 41 | +- The WebSocket server now closes connections on malformed frames instead of stalling on a wedged buffer ([#258](https://github.com/coder/claudecode.nvim/pull/258)). |
| 42 | +- The server now retries port binding on `EADDRINUSE`, fixing parallel Neovim instances colliding on the same port ([#284](https://github.com/coder/claudecode.nvim/pull/284)). |
| 43 | +- Disconnect callbacks now fire on all teardown paths (EOF, read/protocol errors, timeouts), preventing phantom clients ([#176](https://github.com/coder/claudecode.nvim/pull/176)). |
| 44 | +- Detect system sleep and reset keepalive timestamps after wake to prevent false disconnects ([#141](https://github.com/coder/claudecode.nvim/pull/141)). |
| 45 | +- Selection updates are now also sent on `BufEnter` ([#159](https://github.com/coder/claudecode.nvim/pull/159)), and the `provider = "none"` selection-skip fallback uses a substring check ([#160](https://github.com/coder/claudecode.nvim/pull/160)). |
| 46 | +- Debounce timers in the selection tracker are now stopped and closed safely, fixing a libuv handle leak and stale callbacks ([#245](https://github.com/coder/claudecode.nvim/pull/245)). |
| 47 | +- Plugin-created diff splits are now cleaned up deterministically on close ([#175](https://github.com/coder/claudecode.nvim/pull/175)). |
| 48 | +- Bumped the Haiku model alias to the latest version ([#146](https://github.com/coder/claudecode.nvim/pull/146)). |
10 | 49 |
|
11 | | -### Bug Fixes |
| 50 | +### Documentation |
12 | 51 |
|
13 | | -- `closeAllDiffTabs` no longer destroys diffs it does not own. It previously closed every window with `&diff` set and force-deleted any buffer named like `*.diff`/`diff://`/`fugitive://`, so an open diffview.nvim, fugitive, or native `:diffsplit` review 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`/`openDiff` no 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](https://github.com/coder/claudecode.nvim/issues/277)) |
14 | | -- The Claude terminal now adds the loopback hosts (`localhost`, `127.0.0.1`, `::1`) to `no_proxy`/`NO_PROXY`, so a configured `http_proxy`/`all_proxy` no longer tunnels Claude's `ws://127.0.0.1` IDE connection and causes queued @ mentions to time out. Existing `no_proxy` exclusions are preserved. ([#70](https://github.com/coder/claudecode.nvim/issues/70)) |
15 | | -- `focus_after_send = true` no longer fails silently with `terminal.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 new `User ClaudeCodeSendComplete` autocmd, which you can hook to focus your own terminal. (`focus_after_send` still only auto-focuses the in-editor providers.) ([#228](https://github.com/coder/claudecode.nvim/issues/228)) |
16 | | -- 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 `:q` only hides, so the existing `BufDelete`/`BufUnload`/`BufWipeout` autocmds never fired; a `WinClosed` autocmd now handles window-close rejection. ([#238](https://github.com/coder/claudecode.nvim/issues/238)) |
17 | | -- 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 `/ide` flow) — 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 linewise `V` made right after a charwise selection is also no longer mis-extracted to a single character. ([#246](https://github.com/coder/claudecode.nvim/issues/246)) |
18 | | -- Diffs opened via `openDiff` no 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, and `closeAllDiffTabs` now also resolves/cleans the diff module's tracked state instead of only closing windows. ([#248](https://github.com/coder/claudecode.nvim/issues/248)) |
19 | | -- Show diffs when the Claude Code terminal is the only window (no other splits). Previously `openDiff` failed with "No suitable editor window found"; now a split is created to host the diff, matching the behavior of the `openFile` tool. ([#231](https://github.com/coder/claudecode.nvim/issues/231)) |
20 | | -- 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](https://github.com/coder/claudecode.nvim/issues/240), [#183](https://github.com/coder/claudecode.nvim/issues/183)) |
21 | | -- Work around a Neovim core bug (< 0.12.2) that fragmented large bracketed pastes into the terminal across `vim.paste` phases, making Cmd+V appear to truncate content. Added a scoped, version-gated `vim.paste` shim controlled by `terminal.fix_streamed_paste` (`"auto"` by default; no-op on Neovim >= 0.12.2). ([#161](https://github.com/coder/claudecode.nvim/issues/161)) |
| 52 | +- Documented adding `cmd = { ... }` to the lazy.nvim spec so `:ClaudeCode` loads on demand ([#263](https://github.com/coder/claudecode.nvim/pull/263)). |
| 53 | +- Added IDE launch instructions for `provider = "none"` ([#157](https://github.com/coder/claudecode.nvim/pull/157)). |
22 | 54 |
|
23 | 55 | ## [0.3.0] - 2025-09-15 |
24 | 56 |
|
|
0 commit comments