@@ -1158,7 +1158,7 @@ M.cmd.ChatFinder = function()
1158
1158
local right = M .config .style_chat_finder_margin_right or 2
1159
1159
local picker_buf , picker_win , picker_close , picker_resize = M .render .popup (
1160
1160
nil ,
1161
- " Picker: j/k <Esc>|exit <Enter>|open dd |del i|srch" ,
1161
+ " Picker: j/k <Esc>|exit <Enter>|open " .. M . config . chat_shortcut_delete . shortcut .. " |del i|srch" ,
1162
1162
function (w , h )
1163
1163
local wh = h - top - bottom - 2
1164
1164
local ww = w - left - right - 2
@@ -1185,7 +1185,7 @@ M.cmd.ChatFinder = function()
1185
1185
local command_buf , command_win , command_close , command_resize = M .render .popup (
1186
1186
nil ,
1187
1187
" Search: <Tab>/<Shift+Tab>|navigate <Esc>|picker <C-c>|exit "
1188
- .. " <Enter>/<C-f>/<C-x>/<C-v>/<C-t>/<C-g>|open/float/split/vsplit/tab/toggle" ,
1188
+ .. " <Enter>/<C-f>/<C-x>/<C-v>/<C-t>/<C-g>t |open/float/split/vsplit/tab/toggle" ,
1189
1189
function (w , h )
1190
1190
return w - left - right , 1 , h - bottom , left
1191
1191
end ,
@@ -1380,7 +1380,7 @@ M.cmd.ChatFinder = function()
1380
1380
M .helpers .set_keymap ({ picker_buf , preview_buf , command_buf }, { " i" , " n" , " v" }, " <C-t>" , function ()
1381
1381
open_chat (M .BufTarget .tabnew , false )
1382
1382
end )
1383
- M .helpers .set_keymap ({ picker_buf , preview_buf , command_buf }, { " i" , " n" , " v" }, " <C-g>" , function ()
1383
+ M .helpers .set_keymap ({ picker_buf , preview_buf , command_buf }, { " i" , " n" , " v" }, " <C-g>t " , function ()
1384
1384
local target = M .resolve_buf_target (M .config .toggle_target )
1385
1385
open_chat (target , true )
1386
1386
end )
@@ -1408,25 +1408,30 @@ M.cmd.ChatFinder = function()
1408
1408
end )
1409
1409
1410
1410
-- dd on picker or preview window will delete file
1411
- M .helpers .set_keymap ({ picker_buf , preview_buf }, " n" , " dd" , function ()
1412
- local index = vim .api .nvim_win_get_cursor (picker_win )[1 ]
1413
- local file = picker_files [index ]
1414
-
1415
- -- delete without confirmation
1416
- if not M .config .chat_confirm_delete then
1417
- M .helpers .delete_file (file )
1418
- refresh_picker ()
1419
- return
1420
- end
1421
-
1422
- -- ask for confirmation
1423
- vim .ui .input ({ prompt = " Delete " .. file .. " ? [y/N] " }, function (input )
1424
- if input and input :lower () == " y" then
1411
+ M .helpers .set_keymap (
1412
+ { command_buf , picker_buf , preview_buf },
1413
+ { " i" , " n" , " v" },
1414
+ M .config .chat_shortcut_delete .shortcut ,
1415
+ function ()
1416
+ local index = vim .api .nvim_win_get_cursor (picker_win )[1 ]
1417
+ local file = picker_files [index ]
1418
+
1419
+ -- delete without confirmation
1420
+ if not M .config .chat_confirm_delete then
1425
1421
M .helpers .delete_file (file )
1426
1422
refresh_picker ()
1423
+ return
1427
1424
end
1428
- end )
1429
- end )
1425
+
1426
+ -- ask for confirmation
1427
+ vim .ui .input ({ prompt = " Delete " .. file .. " ? [y/N] " }, function (input )
1428
+ if input and input :lower () == " y" then
1429
+ M .helpers .delete_file (file )
1430
+ refresh_picker ()
1431
+ end
1432
+ end )
1433
+ end
1434
+ )
1430
1435
end
1431
1436
1432
1437
---- ----------------------------------------------------------------------------
0 commit comments