Add review.nvim for typed review comments on top of codediff
Comments on lines, ranges or files, exported as markdown to the clipboard so feedback on agent output is pasted rather than retyped. Keeps the existing codediff mappings, which handle repos where origin has no cached HEAD and shas under the cursor. Bumps codediff to 4.0.6, which review.nvim's lifecycle hooks need; the other plugins moved too because vim.pack updates them together. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
89567d5bfc
commit
34950b204a
3 changed files with 41 additions and 5 deletions
|
|
@ -4,5 +4,6 @@ require('config.plugins.codediff')
|
|||
require('config.plugins.fzf-lua')
|
||||
require('config.plugins.gitsigns')
|
||||
require('config.plugins.nvim-tree')
|
||||
require('config.plugins.review')
|
||||
require('config.plugins.web-devicons')
|
||||
require('config.plugins.which-key')
|
||||
|
|
|
|||
26
neovim/config/plugins/review.lua
Normal file
26
neovim/config/plugins/review.lua
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
-- Typed review comments on top of codediff, exported as markdown for an agent.
|
||||
-- nui.nvim draws the comment popup.
|
||||
vim.pack.add({
|
||||
'https://github.com/MunifTanjim/nui.nvim',
|
||||
'https://github.com/georgeguimaraes/review.nvim',
|
||||
})
|
||||
|
||||
require('review').setup({
|
||||
-- base = nil: origin's cached HEAD, then main or master. The codediff
|
||||
-- mappings (<leader>gm, <leader>gR) keep the fuller remote fallback for
|
||||
-- repos where origin has no cached HEAD.
|
||||
branch = { base = nil },
|
||||
export = {
|
||||
-- Clipboard is the whole loop: q exports, then paste into Claude Code.
|
||||
clipboard = true,
|
||||
},
|
||||
})
|
||||
|
||||
local function map(mode, lhs, rhs, desc)
|
||||
vim.keymap.set(mode, lhs, rhs, { desc = desc })
|
||||
end
|
||||
|
||||
map('n', '<leader>rr', '<Cmd>Review<CR>', 'Review working tree')
|
||||
map('n', '<leader>rb', '<Cmd>Review branch<CR>', 'Review branch')
|
||||
map('n', '<leader>rc', '<Cmd>Review commits<CR>', 'Review commits')
|
||||
map({ 'n', 'v' }, '<leader>rn', '<Cmd>Review note<CR>', 'Review note')
|
||||
|
|
@ -10,5 +10,6 @@ wk.add({
|
|||
{ '<leader>f', group = 'find' },
|
||||
{ '<leader>g', group = 'diff' },
|
||||
{ '<leader>h', group = 'hunks' },
|
||||
{ '<leader>r', group = 'review' },
|
||||
{ '<leader>t', group = 'toggles' },
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue