Compare commits

...
Author SHA1 Message Date
Jonny Barnes
e08861b1c6
Wrap markdown at 80 with a colour column guide
Hand-wrapping CLAUDE.md showed there was no visual guide for line length.
textwidth makes gq reflow to 80 and colorcolumn marks column 81, markdown
only so PHP is unaffected. The ftplugin directory is linked whole so later
filetypes need no bootstrap change.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-31 16:28:18 +00:00
Jonny Barnes
34950b204a
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>
2026-10-27 19:59:18 +00:00
6 changed files with 47 additions and 5 deletions

View file

@ -45,6 +45,8 @@ test -d $HOME/.config/nvim/lua || mkdir -p $HOME/.config/nvim/lua
test -L $HOME/.config/nvim/lua/config || ln -f -s $BASEDIR/neovim/config $HOME/.config/nvim/lua/config test -L $HOME/.config/nvim/lua/config || ln -f -s $BASEDIR/neovim/config $HOME/.config/nvim/lua/config
test -d $HOME/.config/nvim/lsp || mkdir -p $HOME/.config/nvim/lsp test -d $HOME/.config/nvim/lsp || mkdir -p $HOME/.config/nvim/lsp
test -L $HOME/.config/nvim/lsp/phpactor.lua || ln -f -s $BASEDIR/neovim/lsp/phpactor.lua $HOME/.config/nvim/lsp/phpactor.lua test -L $HOME/.config/nvim/lsp/phpactor.lua || ln -f -s $BASEDIR/neovim/lsp/phpactor.lua $HOME/.config/nvim/lsp/phpactor.lua
test -d $HOME/.config/nvim/after || mkdir -p $HOME/.config/nvim/after
test -L $HOME/.config/nvim/after/ftplugin || ln -f -s $BASEDIR/neovim/after/ftplugin $HOME/.config/nvim/after/ftplugin
# Claude Code statusline # Claude Code statusline
test -d $HOME/.claude || mkdir $HOME/.claude test -d $HOME/.claude || mkdir $HOME/.claude

View file

@ -0,0 +1,4 @@
-- Hard-wrap prose at 80, the markdownlint/prettier default. +1 puts the guide
-- just past the limit, so a line touching it is still fine.
vim.bo.textwidth = 80
vim.wo.colorcolumn = '+1'

View file

@ -4,5 +4,6 @@ require('config.plugins.codediff')
require('config.plugins.fzf-lua') require('config.plugins.fzf-lua')
require('config.plugins.gitsigns') require('config.plugins.gitsigns')
require('config.plugins.nvim-tree') require('config.plugins.nvim-tree')
require('config.plugins.review')
require('config.plugins.web-devicons') require('config.plugins.web-devicons')
require('config.plugins.which-key') require('config.plugins.which-key')

View 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')

View file

@ -10,5 +10,6 @@ wk.add({
{ '<leader>f', group = 'find' }, { '<leader>f', group = 'find' },
{ '<leader>g', group = 'diff' }, { '<leader>g', group = 'diff' },
{ '<leader>h', group = 'hunks' }, { '<leader>h', group = 'hunks' },
{ '<leader>r', group = 'review' },
{ '<leader>t', group = 'toggles' }, { '<leader>t', group = 'toggles' },
}) })

View file

@ -5,25 +5,33 @@
"src": "https://github.com/catppuccin/nvim" "src": "https://github.com/catppuccin/nvim"
}, },
"codediff.nvim": { "codediff.nvim": {
"rev": "e08a35a56a52c290398ebfaec33c34cfcf2d0f3c", "rev": "09d9ebef2cc5a5c04db7a349cd6c61bdf84ecc8e",
"src": "https://github.com/esmuellert/codediff.nvim" "src": "https://github.com/esmuellert/codediff.nvim"
}, },
"fzf-lua": { "fzf-lua": {
"rev": "8671012a7b2a1648595952c655039d51fb301c14", "rev": "5b88d6f0af7fcb41d4a8bb340bf70d7e3824ee9d",
"src": "https://github.com/ibhagwan/fzf-lua" "src": "https://github.com/ibhagwan/fzf-lua"
}, },
"gitsigns.nvim": { "gitsigns.nvim": {
"rev": "31d6fb2d618bca1482b9f274751ead5f03461408", "rev": "d4854fa9a94b5c8b37dd209fb4a19e98e764186f",
"src": "https://github.com/lewis6991/gitsigns.nvim" "src": "https://github.com/lewis6991/gitsigns.nvim"
}, },
"nui.nvim": {
"rev": "10fc361835c856ba4233ef5ea135b919bf3dce97",
"src": "https://github.com/MunifTanjim/nui.nvim"
},
"nvim-tree.lua": { "nvim-tree.lua": {
"rev": "b2aadda94b107480c48e548d6db51c6840b7b33c", "rev": "3be8cad084e79e84833ef98cef88116c26a224ff",
"src": "https://github.com/nvim-tree/nvim-tree.lua" "src": "https://github.com/nvim-tree/nvim-tree.lua"
}, },
"nvim-web-devicons": { "nvim-web-devicons": {
"rev": "2ae6958df7ced50baac5035cec0c15799eedfbf7", "rev": "ec309a0eaff6ea967e58c275996155ab5c16938d",
"src": "https://github.com/nvim-tree/nvim-web-devicons" "src": "https://github.com/nvim-tree/nvim-web-devicons"
}, },
"review.nvim": {
"rev": "0a379fae01709645956005f76c4650b7740931a3",
"src": "https://github.com/georgeguimaraes/review.nvim"
},
"which-key.nvim": { "which-key.nvim": {
"rev": "3aab2147e74890957785941f0c1ad87d0a44c15a", "rev": "3aab2147e74890957785941f0c1ad87d0a44c15a",
"src": "https://github.com/folke/which-key.nvim" "src": "https://github.com/folke/which-key.nvim"