From bcd04634f95871f07d45ac630585faaf7189dc29 Mon Sep 17 00:00:00 2001 From: d0zingcat Date: Thu, 27 Jun 2024 18:56:53 +0800 Subject: [PATCH] remove copilot and use codeium Signed-off-by: d0zingcat --- nvim/lazy-lock.json | 1 + nvim/lua/plugins/codeium.lua | 13 +++++++++++++ nvim/lua/plugins/copilot.lua | 24 ------------------------ 3 files changed, 14 insertions(+), 24 deletions(-) create mode 100644 nvim/lua/plugins/codeium.lua delete mode 100644 nvim/lua/plugins/copilot.lua diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json index 6434f7d..1e094c3 100644 --- a/nvim/lazy-lock.json +++ b/nvim/lazy-lock.json @@ -5,6 +5,7 @@ "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-vsnip": { "branch": "main", "commit": "989a8a73c44e926199bfd05fa7a516d51f2d2752" }, + "codeium.vim": { "branch": "main", "commit": "7a01ffb1e6538fe634f294908a50a7b680039284" }, "comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, "fidget.nvim": { "branch": "legacy", "commit": "2f7c08f45639a64a5c0abcf67321d52c3f499ae6" }, "gitsigns.nvim": { "branch": "main", "commit": "def49e48c6329527e344d0c99a0d2cd9fdf6bb84" }, diff --git a/nvim/lua/plugins/codeium.lua b/nvim/lua/plugins/codeium.lua new file mode 100644 index 0000000..4610fb6 --- /dev/null +++ b/nvim/lua/plugins/codeium.lua @@ -0,0 +1,13 @@ +return { + 'Exafunction/codeium.vim', + event = 'BufEnter', + config = function() + -- Change '' here to any keycode you like. + vim.keymap.set('i', '', function() return vim.fn['codeium#Accept']() end, { expr = true, silent = true }) + vim.keymap.set('i', '', function() return vim.fn['codeium#CycleCompletions'](1) end, + { expr = true, silent = true }) + vim.keymap.set('i', '', function() return vim.fn['codeium#CycleCompletions'](-1) end, + { expr = true, silent = true }) + vim.keymap.set('i', '', function() return vim.fn['codeium#Clear']() end, { expr = true, silent = true }) + end +} diff --git a/nvim/lua/plugins/copilot.lua b/nvim/lua/plugins/copilot.lua deleted file mode 100644 index c6917c3..0000000 --- a/nvim/lua/plugins/copilot.lua +++ /dev/null @@ -1,24 +0,0 @@ --- return { --- 'zbirenbaum/copilot.lua', --- cmd = 'Copilot', --- event = 'InsertEnter', --- opts = { --- -- panel = { --- -- auto_refresh = true, --- -- }, --- filetypes = { --- ['*'] = true, --- }, --- suggestion = { --- auto_trigger = true, --- keymap = { --- accept = '', --- next = '', --- prev = '', --- } --- } --- } --- } -return { - -}