Skip to content

Release: prepare v0.2.0 #48

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
49 changes: 49 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
29 changes: 22 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ Using [lazy.nvim](https://github.com/folke/lazy.nvim):
ft = { "NvimTree", "neo-tree", "oil" },
},
-- Diff management
{ "<leader>da", "<cmd>ClaudeCodeDiffAccept<cr>", desc = "Accept diff" },
{ "<leader>dq", "<cmd>ClaudeCodeDiffDeny<cr>", desc = "Deny diff" },
{ "<leader>aa", "<cmd>ClaudeCodeDiffAccept<cr>", desc = "Accept diff" },
{ "<leader>ad", "<cmd>ClaudeCodeDiffDeny<cr>", desc = "Deny diff" },
},
}
```
Expand Down Expand Up @@ -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 <file-path> [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 `<leader>da`)
- `:ClaudeCodeDiffDeny` - Deny/reject the current diff changes (equivalent to `<leader>dq`)
- `:ClaudeCodeDiffAccept` - Accept the current diff changes (equivalent to `<leader>aa`)
- `:ClaudeCodeDiffDeny` - Deny/reject the current diff changes (equivalent to `<leader>ad`)

### Toggle Behavior

Expand Down Expand Up @@ -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
- **`<leader>da`** - Accept the changes using the dedicated keymap (configured in LazyVim spec)
- **`<leader>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.

Expand All @@ -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
- **`<leader>dq`** - Reject changes using the dedicated keymap (configured in LazyVim spec)
- **`<leader>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.
Expand Down Expand Up @@ -267,6 +267,9 @@ For most users, the default configuration is sufficient:
desc = "Add file",
ft = { "NvimTree", "neo-tree", "oil" },
},
-- Diff management
{ "<leader>aa", "<cmd>ClaudeCodeDiffAccept<cr>", desc = "Accept diff" },
{ "<leader>ad", "<cmd>ClaudeCodeDiffDeny<cr>", desc = "Deny diff" },
},
}
```
Expand Down Expand Up @@ -295,6 +298,9 @@ For most users, the default configuration is sufficient:
desc = "Add file",
ft = { "NvimTree", "neo-tree", "oil" },
},
-- Diff management
{ "<leader>aa", "<cmd>ClaudeCodeDiffAccept<cr>", desc = "Accept diff" },
{ "<leader>ad", "<cmd>ClaudeCodeDiffDeny<cr>", desc = "Deny diff" },
},
opts = {
-- Server Configuration
Expand Down Expand Up @@ -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 `<leader>da`
- **`auto_close_on_accept`**: Close diff view after accepting changes with `:w` or `<leader>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
Expand All @@ -392,6 +398,9 @@ For most users, the default configuration is sufficient:
desc = "Add file",
ft = { "NvimTree", "neo-tree", "oil" },
},
-- Diff management
{ "<leader>aa", "<cmd>ClaudeCodeDiffAccept<cr>", desc = "Accept diff" },
{ "<leader>ad", "<cmd>ClaudeCodeDiffDeny<cr>", desc = "Deny diff" },
},
opts = {
log_level = "warn", -- Reduce log verbosity
Expand All @@ -418,6 +427,9 @@ For most users, the default configuration is sufficient:
desc = "Add file",
ft = { "NvimTree", "neo-tree", "oil" },
},
-- Diff management
{ "<leader>aa", "<cmd>ClaudeCodeDiffAccept<cr>", desc = "Accept diff" },
{ "<leader>ad", "<cmd>ClaudeCodeDiffDeny<cr>", desc = "Deny diff" },
},
opts = {
log_level = "debug",
Expand Down Expand Up @@ -455,6 +467,9 @@ For most users, the default configuration is sufficient:
desc = "Add file",
ft = { "NvimTree", "neo-tree", "oil" },
},
-- Diff management
{ "<leader>aa", "<cmd>ClaudeCodeDiffAccept<cr>", desc = "Accept diff" },
{ "<leader>ad", "<cmd>ClaudeCodeDiffDeny<cr>", desc = "Deny diff" },
},
opts = {
terminal_cmd = "/opt/claude/bin/claude", -- Custom Claude path
Expand Down
4 changes: 2 additions & 2 deletions lua/claudecode/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions scripts/claude_interactive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -220,7 +220,7 @@ handle_initialize() {
},
"clientInfo": {
"name": "ClaudeCodeNvim",
"version": "0.1.0"
"version": "0.2.0"
}
}')

Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion scripts/lib_claude.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ create_init_message() {
},
"clientInfo": {
"name": "ClaudeCodeNvim",
"version": "0.1.0"
"version": "0.2.0"
}
}' "$id"
}
Expand Down