diff --git a/lua/mappings.lua b/lua/mappings.lua index 24149a9..c830170 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -19,4 +19,17 @@ M.dap_python = { } } + +M.copilot = { + n = { + [""] = { + function() + vim.fn.feedkeys(vim.fn['copilot#Accept'](), '') + end, + "Copilot Accept", + {replace_keycodes = true, nowait=true, silent=true, expr=true, noremap=true} + } + } +} + return M diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 693c591..6b2af81 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -33,6 +33,15 @@ return { "tpope/vim-fugitive", lazy = false, }, + { + "github/copilot.vim", + lazy = false, + config = function() + vim.g.copilot_no_tab_map = true; + vim.g.copilot_assume_mapped = true; + vim.g.copilot_tab_fallback = ""; + end + }, -- These are some examples, uncomment them if you want to see them work! -- { -- "neovim/nvim-lspconfig",