diff --git a/neovim/config/plugins/init.lua b/neovim/config/plugins/init.lua index ea9535b..8fd9d54 100644 --- a/neovim/config/plugins/init.lua +++ b/neovim/config/plugins/init.lua @@ -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') diff --git a/neovim/config/plugins/review.lua b/neovim/config/plugins/review.lua new file mode 100644 index 0000000..68649fe --- /dev/null +++ b/neovim/config/plugins/review.lua @@ -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 (gm, 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', 'rr', 'Review', 'Review working tree') +map('n', 'rb', 'Review branch', 'Review branch') +map('n', 'rc', 'Review commits', 'Review commits') +map({ 'n', 'v' }, 'rn', 'Review note', 'Review note') diff --git a/neovim/config/plugins/which-key.lua b/neovim/config/plugins/which-key.lua index a663754..8463cb9 100644 --- a/neovim/config/plugins/which-key.lua +++ b/neovim/config/plugins/which-key.lua @@ -10,5 +10,6 @@ wk.add({ { 'f', group = 'find' }, { 'g', group = 'diff' }, { 'h', group = 'hunks' }, + { 'r', group = 'review' }, { 't', group = 'toggles' }, }) diff --git a/neovim/nvim-pack-lock.json b/neovim/nvim-pack-lock.json index 9508372..551914b 100644 --- a/neovim/nvim-pack-lock.json +++ b/neovim/nvim-pack-lock.json @@ -5,25 +5,33 @@ "src": "https://github.com/catppuccin/nvim" }, "codediff.nvim": { - "rev": "e08a35a56a52c290398ebfaec33c34cfcf2d0f3c", + "rev": "09d9ebef2cc5a5c04db7a349cd6c61bdf84ecc8e", "src": "https://github.com/esmuellert/codediff.nvim" }, "fzf-lua": { - "rev": "8671012a7b2a1648595952c655039d51fb301c14", + "rev": "5b88d6f0af7fcb41d4a8bb340bf70d7e3824ee9d", "src": "https://github.com/ibhagwan/fzf-lua" }, "gitsigns.nvim": { - "rev": "31d6fb2d618bca1482b9f274751ead5f03461408", + "rev": "d4854fa9a94b5c8b37dd209fb4a19e98e764186f", "src": "https://github.com/lewis6991/gitsigns.nvim" }, + "nui.nvim": { + "rev": "10fc361835c856ba4233ef5ea135b919bf3dce97", + "src": "https://github.com/MunifTanjim/nui.nvim" + }, "nvim-tree.lua": { - "rev": "b2aadda94b107480c48e548d6db51c6840b7b33c", + "rev": "3be8cad084e79e84833ef98cef88116c26a224ff", "src": "https://github.com/nvim-tree/nvim-tree.lua" }, "nvim-web-devicons": { - "rev": "2ae6958df7ced50baac5035cec0c15799eedfbf7", + "rev": "ec309a0eaff6ea967e58c275996155ab5c16938d", "src": "https://github.com/nvim-tree/nvim-web-devicons" }, + "review.nvim": { + "rev": "0a379fae01709645956005f76c4650b7740931a3", + "src": "https://github.com/georgeguimaraes/review.nvim" + }, "which-key.nvim": { "rev": "3aab2147e74890957785941f0c1ad87d0a44c15a", "src": "https://github.com/folke/which-key.nvim"