From bb1316e1fb7c2bb22096b7c5edac6ca11e83c234 Mon Sep 17 00:00:00 2001 From: tronglt Date: Sun, 29 Oct 2023 08:25:54 +0700 Subject: [PATCH] Add Copilot plugin. --- init.lua | 10 ++++++---- lua/custom/plugins/copilot.lua | 3 +++ 2 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 lua/custom/plugins/copilot.lua diff --git a/init.lua b/init.lua index a3d30faa..b1dc57ed 100644 --- a/init.lua +++ b/init.lua @@ -134,10 +134,7 @@ require('lazy').setup({ main = "ibl", -- Enable `lukas-reineke/indent-blankline.nvim` -- See `:help indent_blankline.txt` - opts = { - char = '┊', - show_trailing_blankline_indent = false, - }, + opts = {}, }, -- "gc" to comment visual regions/lines @@ -386,6 +383,11 @@ vim.keymap.set('n', 'N', 'Nzzzv') -- Real paste vim.keymap.set('x', 'p', '"_dP') +-- Copilot configs +vim.g.copilot_assume_mapped = true +vim.g.copilot_no_tab_map = true +vim.api.nvim_set_keymap("i", "", 'copilot#Accept("")', { silent = true, expr = true }) + -- LSP settings. -- This function gets run when an LSP connects to a particular buffer. local on_attach = function(_, bufnr) diff --git a/lua/custom/plugins/copilot.lua b/lua/custom/plugins/copilot.lua new file mode 100644 index 00000000..1ffa9701 --- /dev/null +++ b/lua/custom/plugins/copilot.lua @@ -0,0 +1,3 @@ +return { + "github/copilot.vim" +}