diff --git a/init.lua b/init.lua index 44046bf2..6c17411a 100644 --- a/init.lua +++ b/init.lua @@ -867,7 +867,7 @@ require('lazy').setup({ -- This will auto-import if your LSP supports it. -- This will expand snippets if the LSP sent a snippet. [''] = cmp.mapping.confirm { select = true }, - + [''] = cmp.mapping.confirm { select = true }, -- If you prefer more traditional completion keymaps, -- you can uncomment the following lines --[''] = cmp.mapping.confirm { select = true }, diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 3d5536f2..a6bc4964 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -153,6 +153,12 @@ return { vim.keymap.set('n', 'cp', function() vim.cmd [[Copilot toggle]] end, { noremap = true, silent = true, desc = 'Toggle Copilot' }) + + vim.keymap.set('i', '', 'copilot#Accept("\\")', { + expr = true, + replace_keycodes = false, + }) + vim.g.copilot_no_tab_map = true end, }, {