Skip to content

Latest commit

 

History

History
150 lines (112 loc) · 15.6 KB

CHANGELOG.md

File metadata and controls

150 lines (112 loc) · 15.6 KB

Changelog

[Unreleased]

Features

  • 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)
  • :ClaudeCodeCloseAllDiffs command to close pending Claude diffs at once (e.g. proposals orphaned by resolving them via Claude remote control). A diff you accepted with :w closes 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 :w or :e!, so accepted edits are never discarded. (#248)
  • :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)
  • 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, #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; the ClaudeCodeInlineDiffAdd/Delete/AddSign/DeleteSign highlight groups are customizable. (#82, #195, #293)

Bug Fixes

  • The native terminal provider now adopts only terminal buffers it started, which it marks with b:claudecode_native_terminal. Before, :ClaudeCode, :ClaudeCodeFocus, and :ClaudeCodeOpen adopted any visible terminal whose name contained claude, for example a shell started inside a claudecode.nvim checkout. Upgrade note: a terminal that an older plugin version started (for example after :Lazy reload following 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)
  • 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)
  • 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)
  • 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)
  • 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)
  • 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)
  • 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)
  • 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)
  • 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.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)

[0.3.0] - 2025-09-15

Features

  • External terminal provider to run Claude in a separate terminal (#102)

  • Terminal provider APIs: implement ensure_visible for reliability (#103)

  • Working directory control for Claude terminal (#117)

  • Support function values for external_terminal_cmd for dynamic commands (#119)

  • Add "none" terminal provider option for external CLI management (#130)

  • Shift+Enter keybinding for newline in terminal input (#116)

  • focus_after_send option to control focus after sending to Claude (#118)

  • Snacks: snacks_win_opts to override Snacks.terminal.open() options (#65)

  • Terminal/external quality: CWD support, stricter placeholder parsing, and jobstart CWD (commit e21a837)

  • Diff UX redesign with horizontal layout and new tab options (#111)

  • Prevent diff on dirty buffers (#104)

  • keep_terminal_focus option for diff views (#95)

  • Control behavior when rejecting “new file” diffs (#114)

  • Add Claude Haiku model + updated type annotations (#110)

  • CLAUDE_CONFIG_DIR environment variable support (#58)

  • PartialClaudeCodeConfig type for safer partial configs (#115)

  • Generalize format hook; add floating window docs (commit 7e894e9)

  • Add env configuration option; fix vim.notify scheduling (#21)

  • WebSocket authentication (UUID tokens) for the server (#56)

  • MCP tools compliance aligned with VS Code specs (#57)

  • Mini.files integration and follow-up touch-ups (#89, #98)

Bug Fixes

  • Wrap ERROR/WARN logging in vim.schedule to avoid fast-event context errors (#54)
  • Native terminal: do not wipe Claude buffer on window close (#60)
  • Native terminal: respect auto_close behavior (#63)
  • Snacks integration: fix invalid window with :ClaudeCodeFocus (#64)
  • Debounce update on selection for stability (#92)

Documentation

  • 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)

Refactors & Development

  • Centralize type definitions in dedicated types.lua module (#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)

New Contributors

  • @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

Full Changelog

[0.2.0] - 2025-06-18

Features

  • 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:
    • Added ClaudeCodeFocus command for smart toggle behavior (#40)
    • Implemented auto terminal provider detection (#36)
    • Added configurable auto-close and enhanced terminal architecture (#31)
  • Customizable Diff Keymaps: Made diff keymaps adjustable via LazyVim spec (#47)

Bug Fixes

  • 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=hide for native terminal toggle (#39)

Development Improvements

  • Testing Infrastructure: Moved test runner from shell script to Makefile for better development experience (#37)
  • CI/CD: Added Claude Code GitHub Workflow (#2)

[0.1.0] - 2025-06-02

Initial Release

First public release of claudecode.nvim - the first Neovim IDE integration for Claude Code.

Features

  • 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 :ClaudeCodeSend command
  • Automatic server lifecycle management

Commands

  • :ClaudeCode - Toggle Claude terminal
  • :ClaudeCodeSend - Send visual selection to Claude
  • :ClaudeCodeOpen - Open/focus Claude terminal
  • :ClaudeCodeClose - Close Claude terminal

Requirements

  • Neovim >= 0.8.0
  • Claude Code CLI