From 44b6da6df320b585cf8cd9cacb1101fd25fd8ac2 Mon Sep 17 00:00:00 2001 From: Daniel Weber Date: Thu, 9 Jan 2025 10:28:09 -0500 Subject: [PATCH] Adding a couple keymaps to interface with the AI overlords --- after/plugin/llm.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/after/plugin/llm.lua b/after/plugin/llm.lua index c7cb2e2..e025857 100644 --- a/after/plugin/llm.lua +++ b/after/plugin/llm.lua @@ -31,6 +31,8 @@ require("codecompanion").setup({ } }) + + vim.api.nvim_set_keymap("v", "ce", "", { callback = function() require("codecompanion").prompt("explain") @@ -38,3 +40,11 @@ vim.api.nvim_set_keymap("v", "ce", "", { noremap = true, silent = true, }) + + +vim.api.nvim_set_keymap("n", "", "CodeCompanionActions", { noremap = true, silent = true }) +vim.api.nvim_set_keymap("v", "", "CodeCompanionActions", { noremap = true, silent = true }) +vim.api.nvim_set_keymap("n", "tc", "CodeCompanionChat Toggle", { noremap = true, silent = true }) +vim.api.nvim_set_keymap("v", "tc", "CodeCompanionChat Toggle", { noremap = true, silent = true }) +vim.api.nvim_set_keymap("v", "ga", ":CodeCompanionChat Add", { noremap = true, silent = true }) +