feat: close pumenu on copilot-suggest

This commit is contained in:
2025-10-18 03:27:46 +02:00
parent e7aaee0dd6
commit b3495ef161

View File

@@ -19,4 +19,11 @@ now_if_args(function()
sh = true, sh = true,
typescript = true, typescript = true,
} }
-- remap default <M-\> to first close pumenu if open
local function suggest()
if vim.fn.pumvisible() == 1 then vim.fn.complete(vim.fn.col("."), {}) end
return vim.fn["copilot#Suggest"]()
end
vim.keymap.set("i", "<M-\\>", suggest)
end) end)