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) <noreply@anthropic.com>
This commit is contained in:
Jonny Barnes 2026-09-02 17:14:56 +01:00
commit c78903d447
No known key found for this signature in database

View file

@ -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; <leader>gc is here too so the
-- same key that opened things from the g/diff group also shuts them.