feat: close pumenu on copilot-suggest
This commit is contained in:
@@ -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)
|
||||||
|
Reference in New Issue
Block a user