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
refactor: move diff keymaps to LazyVim spec configuration
- Remove hardcoded keymaps from diff.lua
- Add diff keymaps to LazyVim specs in README.md and dev-config.lua
- Update documentation to reflect LazyVim spec configuration approach
- Provide clear examples for customizing diff keymaps
- Maintain backward compatibility with default <leader>da and <leader>dq
This allows users to easily customize or disable diff keymaps by modifying
their LazyVim plugin configuration instead of needing to override hardcoded
keymaps.
Co-authored-by: ThomasK33 <[email protected]>
Signed-off-by: Thomas Kosiewski <[email protected]>
@@ -139,7 +142,7 @@ When Claude proposes changes to your files, the plugin opens a native Neovim dif
139
142
### Accepting Changes
140
143
141
144
-**`:w` (save)** - Accept the changes and apply them to your file
142
-
-**`<leader>da`** - Accept the changes using the dedicated keymap
145
+
-**`<leader>da`** - Accept the changes using the dedicated keymap (configured in LazyVim spec)
143
146
144
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.
145
148
@@ -148,7 +151,7 @@ Both methods signal Claude Code to apply the changes to your file, after which t
148
151
### Rejecting Changes
149
152
150
153
-**`:q` or `:close`** - Close the diff view to reject the changes
151
-
-**`<leader>dq`** - Reject changes using the dedicated keymap
154
+
-**`<leader>dq`** - Reject changes using the dedicated keymap (configured in LazyVim spec)
152
155
-**`:bdelete` or `:bwipeout`** - Delete the diff buffer to reject changes
153
156
154
157
When you reject changes, the diff view closes and the original file remains unchanged.
@@ -159,12 +162,22 @@ You can also navigate to the Claude Code terminal window and accept or reject di
159
162
160
163
### Customizing Diff Keymaps
161
164
162
-
The default keymaps (`<leader>da` and `<leader>dq`) can be customized by remapping them to the underlying commands:
165
+
The diff keymaps are configured in the LazyVim spec and can be customized by modifying the `keys` table:
163
166
164
167
```lua
165
-
-- Example: Use different keymaps for diff handling
-- Or disable them entirely by omitting them from the keys table
179
+
},
180
+
}
168
181
```
169
182
170
183
The commands `ClaudeCodeDiffAccept` and `ClaudeCodeDiffDeny` work only in diff buffers created by the plugin and will show a warning if used elsewhere.
0 commit comments