From c78903d447be7c809cc2df673a033e0ccfeaa71f Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Wed, 2 Sep 2026 17:14:56 +0100 Subject: [PATCH] Open diffs inline and folded rather than side by side Side-by-side splits each pane to about half a laptop's width, which is too narrow to read. Inline is GitHub's layout; compact folds the unchanged regions away, and the gutter signs replace the pane position as the cue for what changed. `t` and `gc` still toggle both per session. Co-Authored-By: Claude Opus 5 (1M context) --- neovim/config/plugins/codediff.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/neovim/config/plugins/codediff.lua b/neovim/config/plugins/codediff.lua index bda4744..9577d15 100644 --- a/neovim/config/plugins/codediff.lua +++ b/neovim/config/plugins/codediff.lua @@ -1,6 +1,13 @@ vim.pack.add({ 'https://github.com/esmuellert/codediff.nvim' }) require('codediff').setup({ + diff = { + -- Inline, GitHub-style: side-by-side is unreadable at laptop width. `t` + -- toggles back per session, `gc` toggles the folding. + layout = 'inline', + compact = true, + gutter_signs = true, + }, keymaps = { -- q closes the diff tab from inside it; gc is here too so the -- same key that opened things from the g/diff group also shuts them.