You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -88,6 +91,8 @@ That's it! For more configuration options, see [Advanced Setup](#advanced-setup)
88
91
-`:ClaudeCodeSend` - Send current visual selection to Claude, or add files from tree explorer
89
92
-`:ClaudeCodeTreeAdd` - Add selected file(s) from tree explorer to Claude context (also available via ClaudeCodeSend)
90
93
-`:ClaudeCodeAdd <file-path> [start-line] [end-line]` - Add a specific file or directory to Claude context by path with optional line range
94
+
-`:ClaudeCodeDiffAccept` - Accept the current diff changes (equivalent to `<leader>da`)
95
+
-`:ClaudeCodeDiffDeny` - Deny/reject the current diff changes (equivalent to `<leader>dq`)
91
96
92
97
### Toggle Behavior
93
98
@@ -137,7 +142,7 @@ When Claude proposes changes to your files, the plugin opens a native Neovim dif
137
142
### Accepting Changes
138
143
139
144
-**`:w` (save)** - Accept the changes and apply them to your file
140
-
-**`<leader>da`** - Accept the changes using the dedicated keymap
145
+
-**`<leader>da`** - Accept the changes using the dedicated keymap (configured in LazyVim spec)
141
146
142
147
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.
143
148
@@ -146,7 +151,7 @@ Both methods signal Claude Code to apply the changes to your file, after which t
146
151
### Rejecting Changes
147
152
148
153
-**`:q` or `:close`** - Close the diff view to reject the changes
149
-
-**`<leader>dq`** - Reject changes using the dedicated keymap
154
+
-**`<leader>dq`** - Reject changes using the dedicated keymap (configured in LazyVim spec)
150
155
-**`:bdelete` or `:bwipeout`** - Delete the diff buffer to reject changes
151
156
152
157
When you reject changes, the diff view closes and the original file remains unchanged.
@@ -155,6 +160,28 @@ When you reject changes, the diff view closes and the original file remains unch
155
160
156
161
You can also navigate to the Claude Code terminal window and accept or reject diffs directly from within Claude's interface. This provides an alternative way to manage diffs without using the Neovim-specific keymaps.
157
162
163
+
### Customizing Diff Keymaps
164
+
165
+
The diff keymaps are configured in the LazyVim spec and can be customized by modifying the `keys` table:
166
+
167
+
```lua
168
+
{
169
+
"coder/claudecode.nvim",
170
+
config=true,
171
+
keys= {
172
+
-- ... other keymaps ...
173
+
174
+
-- Customize diff keymaps to avoid conflicts (e.g., with debugger)
-- Or disable them entirely by omitting them from the keys table
179
+
},
180
+
}
181
+
```
182
+
183
+
The commands `ClaudeCodeDiffAccept` and `ClaudeCodeDiffDeny` work only in diff buffers created by the plugin and will show a warning if used elsewhere.
184
+
158
185
### How It Works
159
186
160
187
The plugin uses a signal-based approach where accepting or rejecting a diff sends a message to Claude Code rather than directly modifying files. This ensures consistency and allows Claude Code to handle the actual file operations while the plugin manages the user interface and buffer reloading.
0 commit comments