From cb3641a9d95ed49cae2531b5b02576f368c6d054 Mon Sep 17 00:00:00 2001 From: kyasuda Date: Tue, 25 Nov 2025 09:32:26 -0800 Subject: [PATCH] send input directly to codecompanion inline command --- .config/nvim/lua/core/keymaps.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.config/nvim/lua/core/keymaps.lua b/.config/nvim/lua/core/keymaps.lua index e793171..0ee0c2c 100644 --- a/.config/nvim/lua/core/keymaps.lua +++ b/.config/nvim/lua/core/keymaps.lua @@ -239,7 +239,9 @@ local code_companion_mappings = { { mode = "n", key = "Ci", - cmd = ":CodeCompanion #{buffer} ", + cmd = function() + vim.api.nvim_feedkeys(":CodeCompanion #{buffer} ", "n", false) + end, group = "Inline CodeCompanion", opts = nosilent, }, @@ -249,7 +251,9 @@ local code_companion_mappings = { { mode = "v", key = "Ci", - cmd = ":CodeCompanion #{buffer} ", + cmd = function() + vim.api.nvim_feedkeys(":CodeCompanion #{buffer} ", "n", false) + end, group = "CodeCompanion Inline", opts = nosilent, },