Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions lua/gp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,7 @@ M.cmd.ChatFinder = function()
local command_buf, command_win, command_close, command_resize = M.render.popup(
nil,
"Search: <Tab>/<Shift+Tab>|navigate <Esc>|picker <C-c>|exit "
.. "<Enter>/<C-f>/<C-x>/<C-v>/<C-t>/<C-g>t|open/float/split/vsplit/tab/toggle",
.. "<Enter>/<C-f>/<C-x>/<C-v>/<C-t>|toggle/float/split/vsplit/tab",
function(w, h)
return w - left - right, 1, h - bottom, left
end,
Expand Down Expand Up @@ -1463,7 +1463,10 @@ M.cmd.ChatFinder = function()
end

-- enter on picker window will open file
M.helpers.set_keymap({ picker_buf, preview_buf, command_buf }, { "i", "n", "v" }, "<cr>", open_chat)
M.helpers.set_keymap({ picker_buf, preview_buf, command_buf }, { "i", "n", "v" }, "<cr>", function()
local target = M.resolve_buf_target(M.config.toggle_target)
open_chat(target, true)
end)
M.helpers.set_keymap({ picker_buf, preview_buf, command_buf }, { "i", "n", "v" }, "<C-f>", function()
open_chat(M.BufTarget.popup, false)
end)
Expand All @@ -1476,10 +1479,6 @@ M.cmd.ChatFinder = function()
M.helpers.set_keymap({ picker_buf, preview_buf, command_buf }, { "i", "n", "v" }, "<C-t>", function()
open_chat(M.BufTarget.tabnew, false)
end)
M.helpers.set_keymap({ picker_buf, preview_buf, command_buf }, { "i", "n", "v" }, "<C-g>t", function()
local target = M.resolve_buf_target(M.config.toggle_target)
open_chat(target, true)
end)

-- tab in command window will cycle through lines in picker window
M.helpers.set_keymap({ command_buf, picker_buf }, { "i", "n" }, "<tab>", function()
Expand Down