diff --git a/CHANGELOG.md b/CHANGELOG.md index 31535f3..84f4d3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,30 @@ # Changelog +## [0.2.0] - 2025-06-18 + +### Features + +- **Diagnostics Integration**: Added comprehensive diagnostics tool that provides Claude with access to LSP diagnostics information ([#34](https://github.com/coder/claudecode.nvim/pull/34)) +- **File Explorer Integration**: Added support for oil.nvim, nvim-tree, and neotree with @-mention file selection capabilities ([#27](https://github.com/coder/claudecode.nvim/pull/27), [#22](https://github.com/coder/claudecode.nvim/pull/22)) +- **Enhanced Terminal Management**: + - Added `ClaudeCodeFocus` command for smart toggle behavior ([#40](https://github.com/coder/claudecode.nvim/pull/40)) + - Implemented auto terminal provider detection ([#36](https://github.com/coder/claudecode.nvim/pull/36)) + - Added configurable auto-close and enhanced terminal architecture ([#31](https://github.com/coder/claudecode.nvim/pull/31)) +- **Customizable Diff Keymaps**: Made diff keymaps adjustable via LazyVim spec ([#47](https://github.com/coder/claudecode.nvim/pull/47)) + +### Bug Fixes + +- **Terminal Focus**: Fixed terminal focus error when buffer is hidden ([#43](https://github.com/coder/claudecode.nvim/pull/43)) +- **Diff Acceptance**: Improved unified diff acceptance behavior using signal-based approach instead of direct file writes ([#41](https://github.com/coder/claudecode.nvim/pull/41)) +- **Syntax Highlighting**: Fixed missing syntax highlighting in proposed diff view ([#32](https://github.com/coder/claudecode.nvim/pull/32)) +- **Visual Selection**: Fixed visual selection range handling for `:'\<,'\>ClaudeCodeSend` ([#26](https://github.com/coder/claudecode.nvim/pull/26)) +- **Native Terminal**: Implemented `bufhidden=hide` for native terminal toggle ([#39](https://github.com/coder/claudecode.nvim/pull/39)) + +### Development Improvements + +- **Testing Infrastructure**: Moved test runner from shell script to Makefile for better development experience ([#37](https://github.com/coder/claudecode.nvim/pull/37)) +- **CI/CD**: Added Claude Code GitHub Workflow ([#2](https://github.com/coder/claudecode.nvim/pull/2)) + ## [0.1.0] - 2025-06-02 ### Initial Release diff --git a/CLAUDE.md b/CLAUDE.md index 970d940..a47aa1a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -85,6 +85,55 @@ Test files follow the pattern `*_spec.lua` or `*_test.lua` and use the busted fr - Selection tracking is debounced to reduce overhead - Terminal integration supports both snacks.nvim and native Neovim terminal +## Release Process + +### Version Updates + +When updating the version number for a new release, you must update **ALL** of these files: + +1. **`lua/claudecode/init.lua`** - Main version table: + + ```lua + M.version = { + major = 0, + minor = 2, -- Update this + patch = 0, -- Update this + prerelease = nil, -- Remove for stable releases + } + ``` + +2. **`scripts/claude_interactive.sh`** - Multiple client version references: + + - Line ~52: `"version": "0.2.0"` (handshake) + - Line ~223: `"version": "0.2.0"` (initialize) + - Line ~309: `"version": "0.2.0"` (reconnect) + +3. **`scripts/lib_claude.sh`** - ClaudeCodeNvim version: + + - Line ~120: `"version": "0.2.0"` (init message) + +4. **`CHANGELOG.md`** - Add new release section with: + - Release date + - Features with PR references + - Bug fixes with PR references + - Development improvements + +### Release Commands + +```bash +# Get merged PRs since last version +gh pr list --state merged --base main --json number,title,mergedAt,url --jq 'sort_by(.mergedAt) | reverse' + +# Get commit history +git log --oneline v0.1.0..HEAD + +# Always run before committing +make + +# Verify no old version references remain +rg "0\.1\.0" . # Should only show CHANGELOG.md historical entries +``` + ## CRITICAL: Pre-commit Requirements **ALWAYS run `make` before committing any changes.** This runs code quality checks and formatting that must pass for CI to succeed. Never skip this step - many PRs fail CI because contributors don't run the build commands before committing. diff --git a/README.md b/README.md index 6cbf0bd..968a8fe 100644 --- a/README.md +++ b/README.md @@ -62,8 +62,8 @@ Using [lazy.nvim](https://github.com/folke/lazy.nvim): ft = { "NvimTree", "neo-tree", "oil" }, }, -- Diff management - { "da", "ClaudeCodeDiffAccept", desc = "Accept diff" }, - { "dq", "ClaudeCodeDiffDeny", desc = "Deny diff" }, + { "aa", "ClaudeCodeDiffAccept", desc = "Accept diff" }, + { "ad", "ClaudeCodeDiffDeny", desc = "Deny diff" }, }, } ``` @@ -91,8 +91,8 @@ That's it! For more configuration options, see [Advanced Setup](#advanced-setup) - `:ClaudeCodeSend` - Send current visual selection to Claude, or add files from tree explorer - `:ClaudeCodeTreeAdd` - Add selected file(s) from tree explorer to Claude context (also available via ClaudeCodeSend) - `:ClaudeCodeAdd [start-line] [end-line]` - Add a specific file or directory to Claude context by path with optional line range -- `:ClaudeCodeDiffAccept` - Accept the current diff changes (equivalent to `da`) -- `:ClaudeCodeDiffDeny` - Deny/reject the current diff changes (equivalent to `dq`) +- `:ClaudeCodeDiffAccept` - Accept the current diff changes (equivalent to `aa`) +- `:ClaudeCodeDiffDeny` - Deny/reject the current diff changes (equivalent to `ad`) ### Toggle Behavior @@ -142,7 +142,7 @@ When Claude proposes changes to your files, the plugin opens a native Neovim dif ### Accepting Changes - **`:w` (save)** - Accept the changes and apply them to your file -- **`da`** - Accept the changes using the dedicated keymap (configured in LazyVim spec) +- **`aa`** - Accept the changes using the dedicated keymap (configured in LazyVim spec) You can edit the proposed changes in the right-hand diff buffer before accepting them. This allows you to modify Claude's suggestions or make additional tweaks before applying the final version to your file. @@ -151,7 +151,7 @@ Both methods signal Claude Code to apply the changes to your file, after which t ### Rejecting Changes - **`:q` or `:close`** - Close the diff view to reject the changes -- **`dq`** - Reject changes using the dedicated keymap (configured in LazyVim spec) +- **`ad`** - Reject changes using the dedicated keymap (configured in LazyVim spec) - **`:bdelete` or `:bwipeout`** - Delete the diff buffer to reject changes When you reject changes, the diff view closes and the original file remains unchanged. @@ -267,6 +267,9 @@ For most users, the default configuration is sufficient: desc = "Add file", ft = { "NvimTree", "neo-tree", "oil" }, }, + -- Diff management + { "aa", "ClaudeCodeDiffAccept", desc = "Accept diff" }, + { "ad", "ClaudeCodeDiffDeny", desc = "Deny diff" }, }, } ``` @@ -295,6 +298,9 @@ For most users, the default configuration is sufficient: desc = "Add file", ft = { "NvimTree", "neo-tree", "oil" }, }, + -- Diff management + { "aa", "ClaudeCodeDiffAccept", desc = "Accept diff" }, + { "ad", "ClaudeCodeDiffDeny", desc = "Deny diff" }, }, opts = { -- Server Configuration @@ -367,7 +373,7 @@ For most users, the default configuration is sufficient: #### Diff Options -- **`auto_close_on_accept`**: Close diff view after accepting changes with `:w` or `da` +- **`auto_close_on_accept`**: Close diff view after accepting changes with `:w` or `aa` - **`show_diff_stats`**: Display diff statistics (lines added/removed) - **`vertical_split`**: Use vertical split layout for diffs - **`open_in_current_tab`**: Open diffs in current tab instead of creating new tabs @@ -392,6 +398,9 @@ For most users, the default configuration is sufficient: desc = "Add file", ft = { "NvimTree", "neo-tree", "oil" }, }, + -- Diff management + { "aa", "ClaudeCodeDiffAccept", desc = "Accept diff" }, + { "ad", "ClaudeCodeDiffDeny", desc = "Deny diff" }, }, opts = { log_level = "warn", -- Reduce log verbosity @@ -418,6 +427,9 @@ For most users, the default configuration is sufficient: desc = "Add file", ft = { "NvimTree", "neo-tree", "oil" }, }, + -- Diff management + { "aa", "ClaudeCodeDiffAccept", desc = "Accept diff" }, + { "ad", "ClaudeCodeDiffDeny", desc = "Deny diff" }, }, opts = { log_level = "debug", @@ -455,6 +467,9 @@ For most users, the default configuration is sufficient: desc = "Add file", ft = { "NvimTree", "neo-tree", "oil" }, }, + -- Diff management + { "aa", "ClaudeCodeDiffAccept", desc = "Accept diff" }, + { "ad", "ClaudeCodeDiffDeny", desc = "Deny diff" }, }, opts = { terminal_cmd = "/opt/claude/bin/claude", -- Custom Claude path diff --git a/lua/claudecode/init.lua b/lua/claudecode/init.lua index 1e5ad34..e318f28 100644 --- a/lua/claudecode/init.lua +++ b/lua/claudecode/init.lua @@ -20,9 +20,9 @@ local logger = require("claudecode.logger") --- @type ClaudeCode.Version M.version = { major = 0, - minor = 1, + minor = 2, patch = 0, - prerelease = "alpha", + prerelease = nil, string = function(self) local version = string.format("%d.%d.%d", self.major, self.minor, self.patch) if self.prerelease then diff --git a/scripts/claude_interactive.sh b/scripts/claude_interactive.sh index 46d0867..1726179 100755 --- a/scripts/claude_interactive.sh +++ b/scripts/claude_interactive.sh @@ -49,7 +49,7 @@ HANDSHAKE_PARAMS=$(ws_format_json '{ }, "clientInfo": { "name": "claude-nvim-client", - "version": "0.1.0" + "version": "0.2.0" } }') ws_notify "mcp.connect" "$HANDSHAKE_PARAMS" "$CONN_ID" @@ -220,7 +220,7 @@ handle_initialize() { }, "clientInfo": { "name": "ClaudeCodeNvim", - "version": "0.1.0" + "version": "0.2.0" } }') @@ -306,7 +306,7 @@ handle_reconnect() { }, "clientInfo": { "name": "claude-nvim-client", - "version": "0.1.0" + "version": "0.2.0" } }') ws_notify "mcp.connect" "$HANDSHAKE_PARAMS" "$CONN_ID" diff --git a/scripts/lib_claude.sh b/scripts/lib_claude.sh index b623944..b31db0b 100755 --- a/scripts/lib_claude.sh +++ b/scripts/lib_claude.sh @@ -117,7 +117,7 @@ create_init_message() { }, "clientInfo": { "name": "ClaudeCodeNvim", - "version": "0.1.0" + "version": "0.2.0" } }' "$id" }