From 8c3db91e8b1569c1b3f1f10da95a458839c4e9c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Magalh=C3=A3es?= Date: Wed, 15 Nov 2023 16:39:53 -0300 Subject: [PATCH] Copilot --- lua/core/plugins/copilot.lua | 28 ++++++++++++++++++++++++++++ lua/core/plugins/init.lua | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 lua/core/plugins/copilot.lua diff --git a/lua/core/plugins/copilot.lua b/lua/core/plugins/copilot.lua new file mode 100644 index 00000000..5865998f --- /dev/null +++ b/lua/core/plugins/copilot.lua @@ -0,0 +1,28 @@ +return { + -- custom config which piggybacks on the copilot extras in lazy.lua. + { + "zbirenbaum/copilot.lua", + cmd = "Copilot", + build = ":Copilot auth", + event = "InsertEnter", + config = function() + require("copilot").setup({ + panel = { + enabled = true, + auto_refresh = true, + }, + suggestion = { + enabled = true, + auto_trigger = true, + accept = false, -- disable built-in keymapping + keymap = { + accept = "", + next = "", + prev = "", + -- dismiss = "", + }, + }, + }) + end, + }, +} diff --git a/lua/core/plugins/init.lua b/lua/core/plugins/init.lua index c5bb8cdf..53e2d956 100644 --- a/lua/core/plugins/init.lua +++ b/lua/core/plugins/init.lua @@ -167,6 +167,8 @@ local plugins = { require 'kickstart.plugins.autoformat', require 'core.plugins.lsp-file-operations', + + require 'core.plugins.copilot', } local pluginOptions = {}