-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathconfig_default.lua
More file actions
323 lines (277 loc) · 10.1 KB
/
config_default.lua
File metadata and controls
323 lines (277 loc) · 10.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
--- @alias agentic.UserConfig.ProviderName
--- | "claude-acp"
--- | "claude-agent-acp"
--- | "gemini-acp"
--- | "codex-acp"
--- | "opencode-acp"
--- | "cursor-acp"
--- | "auggie-acp"
--- | "mistral-vibe-acp"
--- @alias agentic.UserConfig.HeaderRenderFn fun(parts: agentic.ui.ChatWidget.HeaderParts): string|nil
--- User config headers - each panel can have either config parts or a custom render function
--- @alias agentic.UserConfig.Headers table<agentic.ui.ChatWidget.PanelNames, agentic.ui.ChatWidget.HeaderParts|agentic.UserConfig.HeaderRenderFn|nil>
--- Data passed to the on_prompt_submit hook
--- @class agentic.UserConfig.PromptSubmitData
--- @field prompt string The user's prompt text
--- @field session_id string The ACP session ID
--- @field tab_page_id number The tabpage ID
--- Data passed to the on_response_complete hook
--- @class agentic.UserConfig.ResponseCompleteData
--- @field session_id string The ACP session ID
--- @field tab_page_id number The tabpage ID
--- @field success boolean Whether response completed without error
--- @field error? table Error details if failed
--- @class agentic.UserConfig.Hooks
--- @field on_prompt_submit? fun(data: agentic.UserConfig.PromptSubmitData): nil
--- @field on_response_complete? fun(data: agentic.UserConfig.ResponseCompleteData): nil
--- @class agentic.UserConfig.KeymapEntry
--- @field [1] string The key binding
--- @field mode string|string[] The mode(s) for this binding
--- @alias agentic.UserConfig.KeymapValue string | string[] | (string | agentic.UserConfig.KeymapEntry)[]
--- @class agentic.UserConfig.Keymaps
--- @field widget table<string, agentic.UserConfig.KeymapValue>
--- @field prompt table<string, agentic.UserConfig.KeymapValue>
--- @field diff_preview table<string, string>
--- Window options passed to nvim_set_option_value
--- Overrides default options (wrap, linebreak, winfixbuf, winfixheight)
--- @alias agentic.UserConfig.WinOpts table<string, any>
--- @class agentic.UserConfig
local ConfigDefault = {
--- Enable printing debug messages which can be read via `:messages`
debug = false,
--- @type agentic.UserConfig.ProviderName
provider = "claude-agent-acp",
--- @type table<agentic.UserConfig.ProviderName, agentic.acp.ACPProviderConfig|nil>
acp_providers = {
["claude-agent-acp"] = {
name = "Claude Agent ACP",
command = "claude-agent-acp",
env = {},
},
["claude-acp"] = {
name = "Claude ACP",
command = "claude-code-acp",
env = {},
},
["gemini-acp"] = {
name = "Gemini ACP",
command = "gemini",
args = { "--experimental-acp" },
env = {},
},
["codex-acp"] = {
name = "Codex ACP",
-- https://github.com/zed-industries/codex-acp/releases
-- xattr -dr com.apple.quarantine ~/.local/bin/codex-acp
command = "codex-acp",
args = {
-- "-c",
-- "features.web_search_request=true", -- disabled as it doesn't send proper tool call messages
},
env = {},
},
["opencode-acp"] = {
name = "OpenCode ACP",
command = "opencode",
args = { "acp" },
env = {},
},
["cursor-acp"] = {
name = "Cursor Agent ACP",
command = "cursor-agent-acp",
args = {},
env = {},
},
["auggie-acp"] = {
name = "Auggie ACP",
command = "auggie",
args = {
"--acp",
},
env = {},
},
["mistral-vibe-acp"] = {
name = "Mistral Vibe ACP",
command = "vibe-acp",
args = {},
env = {},
},
},
--- @class agentic.UserConfig.Windows.Chat
--- @field win_opts? agentic.UserConfig.WinOpts
--- @class agentic.UserConfig.Windows.Input
--- @field height number
--- @field win_opts? agentic.UserConfig.WinOpts
--- @class agentic.UserConfig.Windows.Code
--- @field max_height number
--- @field win_opts? agentic.UserConfig.WinOpts
--- @class agentic.UserConfig.Windows.Files
--- @field max_height number
--- @field win_opts? agentic.UserConfig.WinOpts
--- @class agentic.UserConfig.Windows.Diagnostics
--- @field max_height number
--- @field win_opts? agentic.UserConfig.WinOpts
--- @class agentic.UserConfig.Windows.Todos
--- @field display boolean
--- @field max_height number
--- @field win_opts? agentic.UserConfig.WinOpts
--- @alias agentic.UserConfig.Windows.Position "right"|"left"|"bottom"
--- @class agentic.UserConfig.Windows
--- @field position agentic.UserConfig.Windows.Position
--- @field width string|number
--- @field height string|number
--- @field stack_width_ratio number
--- @field chat agentic.UserConfig.Windows.Chat
--- @field input agentic.UserConfig.Windows.Input
--- @field code agentic.UserConfig.Windows.Code
--- @field files agentic.UserConfig.Windows.Files
--- @field diagnostics agentic.UserConfig.Windows.Diagnostics
--- @field todos agentic.UserConfig.Windows.Todos
windows = {
position = "right",
width = "40%",
height = "30%",
stack_width_ratio = 0.4,
chat = { win_opts = {} },
input = { height = 10, win_opts = {} },
code = { max_height = 15, win_opts = {} },
files = { max_height = 10, win_opts = {} },
diagnostics = { max_height = 10, win_opts = {} },
todos = { display = true, max_height = 10, win_opts = {} },
},
--- @type agentic.UserConfig.Keymaps
keymaps = {
--- Keys bindings for ALL buffers in the widget
widget = {
close = "q",
change_mode = {
{
"<S-Tab>",
mode = { "i", "n", "v" },
},
},
switch_provider = "<localLeader>s",
switch_model = "<localLeader>m",
},
--- Keys bindings for the prompt buffer
prompt = {
submit = {
"<CR>",
{
"<C-s>",
mode = { "i", "n", "v" },
},
},
paste_image = {
{
"<localLeader>p",
mode = { "n" },
},
{
"<C-v>", -- Same as Claude-code in insert mode
mode = { "i" },
},
},
accept_completion = {
{
"<Tab>",
mode = { "i" },
},
},
},
--- Keys bindings for diff preview navigation
diff_preview = {
next_hunk = "]c",
prev_hunk = "[c",
},
},
-- stylua: ignore start
--- @class agentic.UserConfig.SpinnerChars
--- @field generating string[]
--- @field thinking string[]
--- @field searching string[]
--- @field busy string[]
spinner_chars = {
generating = { "·", "✢", "✳", "∗", "✻", "✽" },
thinking = { "🤔", "🤨" },
searching = { "🔎. . .", ". 🔎. .", ". . 🔎." },
busy = { "⡀", "⠄", "⠂", "⠁", "⠈", "⠐", "⠠", "⢀", "⣀", "⢄", "⢂", "⢁", "⢈", "⢐", "⢠", "⣠", "⢤", "⢢", "⢡", "⢨", "⢰", "⣰", "⢴", "⢲", "⢱", "⢸", "⣸", "⢼", "⢺", "⢹", "⣹", "⢽", "⢻", "⣻", "⢿", "⣿", },
},
-- stylua: ignore end
--- Icons used to identify tool call states
--- @class agentic.UserConfig.StatusIcons
status_icons = {
pending = "",
completed = "✔",
failed = "",
},
--- Icons used for diagnostics in the context panel
--- @class agentic.UserConfig.DiagnosticIcons
--- @field error string
--- @field warn string
--- @field info string
--- @field hint string
diagnostic_icons = {
error = "❌",
warn = "⚠️",
info = "ℹ️",
hint = "✨",
},
--- @class agentic.UserConfig.PermissionIcons
permission_icons = {
allow_once = "",
allow_always = "",
reject_once = "",
reject_always = "",
},
--- @class agentic.UserConfig.FilePicker
file_picker = {
enabled = true,
},
--- @class agentic.UserConfig.ImagePaste
--- @field enabled boolean Enable image drag-and-drop to add images to referenced files
image_paste = {
enabled = true,
},
--- @class agentic.UserConfig.AutoScroll
--- @field threshold integer Lines from bottom to trigger auto-scroll (default: 10)
auto_scroll = {
threshold = 10,
},
--- Show diff preview for edit tool calls in the buffer
--- @class agentic.UserConfig.DiffPreview
--- @field enabled boolean
--- @field layout "inline" | "split"
--- @field center_on_navigate_hunks boolean
diff_preview = {
enabled = true,
layout = "split",
center_on_navigate_hunks = true,
},
--- @type agentic.UserConfig.Hooks
hooks = {
on_prompt_submit = nil,
on_response_complete = nil,
},
--- Customize window headers for each panel in the chat widget.
--- Each header can be either:
--- 1. A table with title and suffix fields
--- 2. A function that receives header parts and returns a custom header string
---
--- The context field is managed internally and shows dynamic info like counts.
---
--- @type agentic.UserConfig.Headers
headers = {},
--- Control various behaviors and features of the plugin
--- @class agentic.UserConfig.Settings
settings = {
--- Automatically move cursor to chat window after submitting a prompt
move_cursor_to_chat_on_submit = true,
},
--- @class agentic.UserConfig.SessionRestore
--- @field storage_path? string Path to store session data; if nil, default path is used: ~/.cache/nvim/agentic/sessions/
session_restore = {
storage_path = nil,
},
}
return ConfigDefault