Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0f7c9ba

Browse files
feat: redesign diff view with horizontal layout and new tab options
Change-Id: Ia8df210bad3a05b7eddd92fafbbb4f8aa90e2704 Signed-off-by: Thomas Kosiewski <tk@coder.com>
1 parent 1489c70 commit 0f7c9ba

File tree

7 files changed

+538
-181
lines changed

7 files changed

+538
-181
lines changed

‎dev-config.lua

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,29 +40,28 @@ return {
4040
},
4141

4242
-- Development configuration - all options shown with defaults commented out
43+
---@type ClaudeCodeConfig
4344
opts = {
4445
-- Server Configuration
45-
-- port_range = { min = 10000, max = 65535 }, -- WebSocket server port range
46-
-- auto_start = true, -- Auto-start server on Neovim startup
47-
-- log_level = "info", -- "trace", "debug", "info", "warn", "error"
48-
-- terminal_cmd = nil, -- Custom terminal command (default: "claude")
46+
-- port_range = { min = 10000, max = 65535 }, -- WebSocket server port range
47+
-- auto_start = true, -- Auto-start server on Neovim startup
48+
-- log_level = "info", -- "trace", "debug", "info", "warn", "error"
49+
-- terminal_cmd = nil, -- Custom terminal command (default: "claude")
4950

5051
-- Selection Tracking
51-
-- track_selection = true, -- Enable real-time selection tracking
52-
-- visual_demotion_delay_ms = 50, -- Delay before demoting visual selection (ms)
52+
-- track_selection = true, -- Enable real-time selection tracking
53+
-- visual_demotion_delay_ms = 50, -- Delay before demoting visual selection (ms)
5354

5455
-- Connection Management
55-
-- connection_wait_delay = 200, -- Wait time after connection before sending queued @ mentions (ms)
56-
-- connection_timeout = 10000, -- Max time to wait for Claude Code connection (ms)
57-
-- queue_timeout = 5000, -- Max time to keep @ mentions in queue (ms)
56+
-- connection_wait_delay = 200, -- Wait time after connection before sending queued @ mentions (ms)
57+
-- connection_timeout = 10000, -- Max time to wait for Claude Code connection (ms)
58+
-- queue_timeout = 5000, -- Max time to keep @ mentions in queue (ms)
5859

5960
-- Diff Integration
6061
-- diff_opts = {
61-
-- auto_close_on_accept = true, -- Close diff view after accepting changes
62-
-- show_diff_stats = true, -- Show diff statistics
63-
-- vertical_split = true, -- Use vertical split for diffs
64-
-- open_in_current_tab = true, -- Open diffs in current tab vs new tab
65-
-- keep_terminal_focus = false, -- If true, moves focus back to terminal after diff opens
62+
-- layout = "horizontal", -- "vertical" or "horizontal" diff layout
63+
-- open_in_new_tab = true, -- Open diff in a new tab (false = use current tab)
64+
-- keep_terminal_focus = true, -- Keep focus in terminal after opening diff
6665
-- },
6766

6867
-- Terminal Configuration

‎lua/claudecode/config.lua

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,8 @@ M.defaults = {
1919
connection_timeout = 10000, -- Maximum time to wait for Claude Code to connect (milliseconds)
2020
queue_timeout = 5000, -- Maximum time to keep @ mentions in queue (milliseconds)
2121
diff_opts = {
22-
auto_close_on_accept = true,
23-
show_diff_stats = true,
24-
vertical_split = true,
25-
open_in_current_tab = true, -- Use current tab instead of creating new tab
22+
layout = "vertical",
23+
open_in_new_tab = false, -- Open diff in a new tab (false = use current tab)
2624
keep_terminal_focus = false, -- If true, moves focus back to terminal after diff opens
2725
},
2826
models = {
@@ -82,10 +80,11 @@ function M.validate(config)
8280
assert(type(config.queue_timeout) == "number" and config.queue_timeout > 0, "queue_timeout must be a positive number")
8381

8482
assert(type(config.diff_opts) == "table", "diff_opts must be a table")
85-
assert(type(config.diff_opts.auto_close_on_accept) == "boolean", "diff_opts.auto_close_on_accept must be a boolean")
86-
assert(type(config.diff_opts.show_diff_stats) == "boolean", "diff_opts.show_diff_stats must be a boolean")
87-
assert(type(config.diff_opts.vertical_split) == "boolean", "diff_opts.vertical_split must be a boolean")
88-
assert(type(config.diff_opts.open_in_current_tab) == "boolean", "diff_opts.open_in_current_tab must be a boolean")
83+
assert(
84+
config.diff_opts.layout == "vertical" or config.diff_opts.layout == "horizontal",
85+
"diff_opts.layout must be 'vertical' or 'horizontal'"
86+
)
87+
assert(type(config.diff_opts.open_in_new_tab) == "boolean", "diff_opts.open_in_new_tab must be a boolean")
8988
assert(type(config.diff_opts.keep_terminal_focus) == "boolean", "diff_opts.keep_terminal_focus must be a boolean")
9089

9190
-- Validate env

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /