From 2a4747a7397417c4ee1ff24880a487c76d0913e5 Mon Sep 17 00:00:00 2001 From: Ariel D'Alessandro Date: Wed, 6 Apr 2022 16:48:21 +0200 Subject: move to copilot cmp --- after/plugin/completition.lua | 2 ++ lua/alpha/plugins.lua | 13 ++++++++++++- plugin/copilot.vim | 2 -- plugin/keymaps.vim | 2 ++ plugin/packer_compiled.lua | 40 +++++++++++++++++++++++++++++++--------- 5 files changed, 47 insertions(+), 12 deletions(-) delete mode 100644 plugin/copilot.vim diff --git a/after/plugin/completition.lua b/after/plugin/completition.lua index e1b55f6..644b185 100644 --- a/after/plugin/completition.lua +++ b/after/plugin/completition.lua @@ -39,6 +39,7 @@ cmp.setup { }, sources = { { name = "nvim_lua" }, + { name = "copilot" }, { name = "nvim_lsp" }, { name = "path" }, { name = "luasnip" }, @@ -72,6 +73,7 @@ cmp.setup { nvim_lua = "[api]", path = "[path]", luasnip = "[snip]", + copilot = "[copilot]", } } }, diff --git a/lua/alpha/plugins.lua b/lua/alpha/plugins.lua index e617d12..0b3e6a5 100644 --- a/lua/alpha/plugins.lua +++ b/lua/alpha/plugins.lua @@ -97,7 +97,18 @@ return require('packer').startup(function(use) 'ray-x/lsp_signature.nvim' } - use "github/copilot.vim" + -- use "github/copilot.vim" + use { + "zbirenbaum/copilot.lua", + event = "InsertEnter", + config = function () + vim.schedule(function() require("copilot").setup() end) + end, + } + use { + "zbirenbaum/copilot-cmp", + after = {"copilot.lua", "nvim-cmp"}, + } use { 'nvim-telescope/telescope.nvim', diff --git a/plugin/copilot.vim b/plugin/copilot.vim deleted file mode 100644 index 44983e5..0000000 --- a/plugin/copilot.vim +++ /dev/null @@ -1,2 +0,0 @@ -imap