diff --git a/.config/nvim/lua/core/keymaps.lua b/.config/nvim/lua/core/keymaps.lua index e8c6572..58cdb20 100644 --- a/.config/nvim/lua/core/keymaps.lua +++ b/.config/nvim/lua/core/keymaps.lua @@ -147,14 +147,20 @@ keymap( ) -- Copilot -keymap({ "n", "v" }, "coa", function() +keymap({ "n", "v" }, "coh", function() local actions = require("CopilotChat.actions") require("CopilotChat.integrations.telescope").pick(actions.help_actions()) end, vim.tbl_extend("force", opts, { desc = "CopilotChat - Help actions" })) -keymap("n", "coh", function() +keymap({ "n", "v" }, "cop", function() local actions = require("CopilotChat.actions") require("CopilotChat.integrations.telescope").pick(actions.prompt_actions()) end, vim.tbl_extend("force", opts, { desc = "CopilotChat - Prompt actions" })) +keymap("n", "coq", function() + local input = vim.fn.input("Quick Chat: ") + if input ~= "" then + require("CopilotChat").ask(input, { selection = require("CopilotChat.select").buffer }) + end +end, vim.tbl_extend("force", opts, { desc = "CopilotChat - Quick chat" })) -- Better paste keymap("v", "p", "P", vim.tbl_extend("force", opts, { desc = "Paste" }))