You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #195 added diff_opts.layout = "inline" (merged in f64c307, queued for v0.4.0 via release-please #279). @wookayin pointed out that the shipped implementation isn't a true "inline" diff in the VS Code sense, and that the name risks a breaking-change trap later. This issue tracks deciding the naming before v0.4.0 ships, while it's still cheap to change.
What layout = "inline" does today
It renders a unified diff in a separate vsplit pane — a single read-only buffer named <file> (inline diff) with interleaved red (deleted) / green (added) lines:
lua/claudecode/diff_inline.lua:260 → rightbelow vsplit (opens a new window)
lua/claudecode/diff_inline.lua:200 → buffer named … (inline diff)
A "VS Code-style inline" diff, as users typically picture it, is an in-place overlay: changes shown as virtual text (virt_lines extmarks) layered onto the file in the same window, not a separate split (cf. mini.diff, gitsigns preview, sidekick NES, Cursor inline edits).
So:
The shipped "inline" is really "a unified diff in a vertical split" — closer to "unified" / "inline_vertical" than to true inline.
If/when we add the real in-place overlay, that mode is the one that most deserves the name "inline". Shipping the current behavior as "inline" now forces a later choice between an awkward name for the overlay or a breaking rename of "inline".
Why now
"inline" is not yet in a tagged release (latest is v0.3.0), but it is queued in the open release-please PR #279 (v0.4.0). Renaming is free before that PR merges and a breaking change afterward.
Options
Rename now, reserve "inline" for the overlay — e.g. "unified" (canonical diff term, orthogonal to vertical/horizontal). Optionally keep "inline" as a deprecated, warned alias for users tracking main. (Recommended.)
Keep "inline", name the future overlay "overlay" / "in_place". Defensible — VS Code's diff editor does have an "Inline View" toggle (renderSideBySide=false) that produces exactly this unified single-pane view.
Separate follow-ups (not naming): the inline path is read-only (no pre-accept editing); it doesn't fire the ClaudeCodeDiffOpened / ClaudeCodeDiffClosed autocmds the native diff does; README "VS Code-style" wording oversells it. A true in-place overlay (proposed = real editable lines, deleted = virt_lines) is the likely future "inline".
Summary
PR #195 added
diff_opts.layout = "inline"(merged inf64c307, queued for v0.4.0 via release-please #279). @wookayin pointed out that the shipped implementation isn't a true "inline" diff in the VS Code sense, and that the name risks a breaking-change trap later. This issue tracks deciding the naming before v0.4.0 ships, while it's still cheap to change.What
layout = "inline"does todayIt renders a unified diff in a separate vsplit pane — a single read-only buffer named
<file> (inline diff)with interleaved red (deleted) / green (added) lines:lua/claudecode/diff_inline.lua:260→rightbelow vsplit(opens a new window)lua/claudecode/diff_inline.lua:200→ buffer named… (inline diff)lua/claudecode/diff_inline.lua:206→modifiable = falseThe concern
A "VS Code-style inline" diff, as users typically picture it, is an in-place overlay: changes shown as virtual text (
virt_linesextmarks) layered onto the file in the same window, not a separate split (cf. mini.diff, gitsigns preview, sidekick NES, Cursor inline edits).So:
"inline"is really "a unified diff in a vertical split" — closer to"unified"/"inline_vertical"than to true inline."inline". Shipping the current behavior as"inline"now forces a later choice between an awkward name for the overlay or a breaking rename of"inline".Why now
"inline"is not yet in a tagged release (latest is v0.3.0), but it is queued in the open release-please PR #279 (v0.4.0). Renaming is free before that PR merges and a breaking change afterward.Options
"inline"for the overlay — e.g."unified"(canonical diff term, orthogonal tovertical/horizontal). Optionally keep"inline"as a deprecated, warned alias for users trackingmain. (Recommended.)"inline", name the future overlay"overlay"/"in_place". Defensible — VS Code's diff editor does have an "Inline View" toggle (renderSideBySide=false) that produces exactly this unified single-pane view.Rename surface (if we rename)
lua/claudecode/config.lua:132-137— validation + error messagelua/claudecode/types.lua:34—ClaudeCodeDiffLayoutaliaslua/claudecode/diff.lua— dispatch checks at lines 834 / 928 / 1157 / 1306 (the internalclaudecode_inline_diffbuffer var at :1780 can stay)lua/claudecode/diff_inline.lua— module + buffer nameREADME.md:374-378tests/unit/diff_inline_spec.luaRelated / out of scope here
ClaudeCodeDiffOpened/ClaudeCodeDiffClosedautocmds the native diff does; README "VS Code-style" wording oversells it. A true in-place overlay (proposed = real editable lines, deleted =virt_lines) is the likely future"inline".