Skip to content

Commit 1319d40

Browse files
chore(release): 0.4.0
1 parent 5a04f8b commit 1319d40

3 files changed

Lines changed: 46 additions & 20 deletions

File tree

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.3.0"
2+
".": "0.4.0"
33
}

CHANGELOG.md

Lines changed: 44 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,50 @@
22

33
## [Unreleased]
44

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))
10-
- `terminal.auto_insert` option (default `true`) 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; set `auto_insert = false` to stay in Normal mode and preserve the scroll position (press `i` to type). Applies to the `native` and `snacks` providers and the new-tab diff terminal. ([#232](https://github.com/coder/claudecode.nvim/issues/232), [#145](https://github.com/coder/claudecode.nvim/issues/145))
11-
12-
### Bug Fixes
13-
14-
- `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))
15-
- 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))
16-
- `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))
17-
- 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))
18-
- 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))
19-
- 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))
20-
- 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))
21-
- 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))
22-
- 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))
5+
## [0.4.0] - 2026-06-23
6+
7+
### Added
8+
9+
- `:checkhealth claudecode` health check that verifies Neovim version, `setup()`, Claude CLI resolution, terminal provider, WebSocket server, lock file, and live client connection ([#275](https://github.com/coder/claudecode.nvim/pull/275)).
10+
- `:ClaudeCodeSendText {text}` command and `require("claudecode.terminal").send_to_terminal(text, opts)` to send arbitrary text to the open Claude terminal (multi-line via bracketed paste); `:ClaudeCodeSendText!` inserts without submitting. Works with the `native`/`snacks` providers only ([#272](https://github.com/coder/claudecode.nvim/pull/272), [#197](https://github.com/coder/claudecode.nvim/issues/197)).
11+
- `:ClaudeCodeCloseAllDiffs` command to close all pending Claude diffs at once; already-accepted-but-unwritten diffs are left intact ([#261](https://github.com/coder/claudecode.nvim/pull/261), [#248](https://github.com/coder/claudecode.nvim/issues/248)).
12+
- `diff_opts.layout = "inline"` for a VS Code-style unified inline diff in a single buffer (requires Neovim >= 0.9) ([#195](https://github.com/coder/claudecode.nvim/pull/195)).
13+
- `User ClaudeCodeSendComplete` autocmd fired once per accepted send while Claude is connected, with `data = { file_path, start_line, end_line, context }`, enabling post-send hooks such as focusing an external Claude session ([#265](https://github.com/coder/claudecode.nvim/pull/265), [#228](https://github.com/coder/claudecode.nvim/issues/228)).
14+
- `User ClaudeCodeDiffOpened` / `ClaudeCodeDiffClosed` autocmds, plus `terminal.diff_split_width_percentage` and `diff_opts.auto_resize_terminal` to control terminal width during a diff ([#270](https://github.com/coder/claudecode.nvim/pull/270)).
15+
- `terminal.auto_insert` option (default `true`) to preserve Normal-mode scroll position when focusing the Claude terminal ([#233](https://github.com/coder/claudecode.nvim/pull/233)).
16+
- netrw file selection support for `<leader>as` ([#62](https://github.com/coder/claudecode.nvim/pull/62)).
17+
- snacks.nvim picker support for `:ClaudeCodeTreeAdd` / `:ClaudeCodeSend` ([#269](https://github.com/coder/claudecode.nvim/pull/269), [#192](https://github.com/coder/claudecode.nvim/issues/192)).
18+
19+
### Fixed
20+
21+
- `closeAllDiffTabs` is now scoped to claudecode's own diffs and no longer destroys unrelated diffview.nvim/fugitive/`:diffsplit` reviews; `openFile`/`openDiff` no longer reuse a window in diff mode ([#290](https://github.com/coder/claudecode.nvim/pull/290), [#277](https://github.com/coder/claudecode.nvim/issues/277)).
22+
- Pending `openDiff` diffs are now auto-closed when the client disconnects or the integration stops ([#261](https://github.com/coder/claudecode.nvim/pull/261), [#248](https://github.com/coder/claudecode.nvim/issues/248)).
23+
- Rejecting a diff with `:q`/`:close`/`<C-w>c` now resolves it as rejected via a `WinClosed` autocmd ([#266](https://github.com/coder/claudecode.nvim/pull/266)).
24+
- Diffs now open when the Claude terminal is the only window by creating a split ([#260](https://github.com/coder/claudecode.nvim/pull/260)).
25+
- Stranded tab is closed when an `open_in_new_tab` diff setup errors ([#264](https://github.com/coder/claudecode.nvim/pull/264)).
26+
- `keep_terminal_focus` now works with floating Claude terminals ([#178](https://github.com/coder/claudecode.nvim/pull/178)).
27+
- Empty buffer is wiped when the diff terminal provider is `none` ([#223](https://github.com/coder/claudecode.nvim/pull/223)).
28+
- Prevent a segfault with render-markdown.nvim when accepting a new-file diff ([#224](https://github.com/coder/claudecode.nvim/pull/224)).
29+
- Snacks Explorer/picker list windows are excluded from main-editor-window detection so diffs no longer open over them ([#165](https://github.com/coder/claudecode.nvim/pull/165), [#255](https://github.com/coder/claudecode.nvim/pull/255)).
30+
- Legacy `diff_opts` (`vertical_split`, `open_in_current_tab`) are honored again ([#142](https://github.com/coder/claudecode.nvim/pull/142)).
31+
- Quickly-made visual selections are now pushed to Claude reliably, including single-line `V` selections and the `/ide` external-terminal flow ([#267](https://github.com/coder/claudecode.nvim/pull/267), [#246](https://github.com/coder/claudecode.nvim/issues/246)).
32+
- Selection updates are also sent on `BufEnter` ([#159](https://github.com/coder/claudecode.nvim/pull/159)) and use a substring check so external (`provider = "none"`) terminals are detected ([#160](https://github.com/coder/claudecode.nvim/pull/160)).
33+
- `ClaudeCodeSend` classifies tree/explorer buffers by filetype only, fixing misrouting of normal files whose path contains `neo-tree`/`NvimTree` ([#292](https://github.com/coder/claudecode.nvim/pull/292), [#289](https://github.com/coder/claudecode.nvim/issues/289)).
34+
- Snacks terminal no longer leaves a "climbing cursor" on hide/show toggle (float fix requires Neovim >= 0.10) ([#271](https://github.com/coder/claudecode.nvim/pull/271), [#240](https://github.com/coder/claudecode.nvim/issues/240), [#183](https://github.com/coder/claudecode.nvim/issues/183)).
35+
- Work around a Neovim core bug (< 0.12.2) that fragmented large bracketed pastes into the terminal, gated by `terminal.fix_streamed_paste` (`"auto"` default) ([#252](https://github.com/coder/claudecode.nvim/pull/252)).
36+
- Snacks launch no longer fails on model aliases containing shell glob characters (e.g. `opus[1m]`) ([#256](https://github.com/coder/claudecode.nvim/pull/256)).
37+
- Loopback hosts are excluded from `no_proxy`/`NO_PROXY` so a configured proxy no longer tunnels Claude's `ws://127.0.0.1` IDE connection ([#268](https://github.com/coder/claudecode.nvim/pull/268), [#70](https://github.com/coder/claudecode.nvim/issues/70)).
38+
- `$` in file paths is handled correctly for `ClaudeCodeAdd` and `openFile` ([#286](https://github.com/coder/claudecode.nvim/pull/286)).
39+
- IDE diagnostics accept a bare file path without a `file://` URI ([#163](https://github.com/coder/claudecode.nvim/pull/163)); diagnostic results are returned as grouped URI payloads with editor-native ranges and severity names, and a background `openFile` is hardened ([#274](https://github.com/coder/claudecode.nvim/pull/274)).
40+
- WebSocket server closes connections on malformed frames instead of stalling ([#258](https://github.com/coder/claudecode.nvim/pull/258)), fires `on_disconnect` consistently across all teardown paths ([#176](https://github.com/coder/claudecode.nvim/pull/176)), and retries port binding on `EADDRINUSE` so parallel Neovim instances each get a port ([#284](https://github.com/coder/claudecode.nvim/pull/284)).
41+
- System sleep/wake no longer triggers false keepalive disconnections ([#141](https://github.com/coder/claudecode.nvim/pull/141)); selection debounce timers are closed safely ([#245](https://github.com/coder/claudecode.nvim/pull/245)).
42+
- Auth token is generated from a CSPRNG and the lock file is written with `0600` permissions in a `0700` directory ([#259](https://github.com/coder/claudecode.nvim/pull/259)).
43+
- `focus_after_send = true` now warns once at setup with `provider = "none"`/`"external"`, pointing to the `User ClaudeCodeSendComplete` autocmd ([#265](https://github.com/coder/claudecode.nvim/pull/265), [#228](https://github.com/coder/claudecode.nvim/issues/228)).
44+
45+
### Changed
46+
47+
- Model picker labels are now version-free (`Claude Opus (Latest)`, etc.) with new 1M-context and `Default` entries; the latest Haiku is `4.5` ([#256](https://github.com/coder/claudecode.nvim/pull/256), [#146](https://github.com/coder/claudecode.nvim/pull/146), [ac60fda](https://github.com/coder/claudecode.nvim/commit/ac60fda)).
48+
- Documentation: IDE launch instructions for `provider = "none"` ([#157](https://github.com/coder/claudecode.nvim/pull/157)) and lazy.nvim `cmd` triggers so `:ClaudeCode` loads on demand ([#263](https://github.com/coder/claudecode.nvim/pull/263)).
2349

2450
## [0.3.0] - 2025-09-15
2551

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.3.0
1+
0.4.0

0 commit comments

Comments
 (0)