@@ -6,10 +6,11 @@ local logger = require("claudecode.logger")
6
6
7
7
-- Global state management for active diffs
8
8
9
- local active_diffs = {}
10
- local autocmd_group
9
+ --- @type ClaudeCodeConfig
11
10
local config
12
11
12
+ --- @type number
13
+ local autocmd_group
13
14
--- Get or create the autocmd group
14
15
local function get_autocmd_group ()
15
16
if not autocmd_group then
@@ -112,7 +113,7 @@ local function is_buffer_dirty(file_path)
112
113
end
113
114
114
115
--- Setup the diff module
115
- --- @param user_config table ? The configuration passed from init.lua
116
+ --- @param user_config ClaudeCodeConfig ? The configuration passed from init.lua
116
117
function M .setup (user_config )
117
118
-- Store the configuration for later use
118
119
config = user_config or {}
@@ -336,6 +337,9 @@ function M._open_native_diff(old_file_path, new_file_path, new_file_contents, ta
336
337
}
337
338
end
338
339
340
+ --- @type table<string , table>
341
+ local active_diffs = {}
342
+
339
343
--- Register diff state for tracking
340
344
--- @param tab_name string Unique identifier for the diff
341
345
--- @param diff_data table Diff state data
@@ -638,7 +642,7 @@ function M._create_diff_view_from_window(target_window, old_file_path, new_buffe
638
642
if terminal_win then
639
643
vim .api .nvim_set_current_win (terminal_win )
640
644
end
641
- end , 0 )
645
+ end )
642
646
end
643
647
644
648
-- Return window information for later storage
0 commit comments