master - refix disable tab when using copilot

This commit is contained in:
huyjaky
2025-07-27 23:58:09 +07:00
parent 827a408378
commit f0c5a8f756
9 changed files with 147 additions and 140 deletions

View File

@@ -97,8 +97,6 @@ return {
-- Tab to select completion
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() and has_words_before() then
vim.g.copilot_no_tab_map = true -- NOTE: disable copilot's tab mapping PART1
fallback()
else
fallback()
@@ -123,7 +121,6 @@ return {
-- NOTE: disable tabl when using copilot PART2
vim.api.nvim_set_keymap("i", "<C-f>", 'copilot#Accept("\\<CR>")', { expr = true, silent = true }),
vim.keymap.del("i", "<Tab>"),
-- ["<C-f>"] = cmp.mapping(function(fallback)
-- -- Check if Copilot is suggesting something
-- if vim.fn["copilot#Accept"]() ~= "" then