From 655ea643e768ff19a39985d5a627074e6e7abea1 Mon Sep 17 00:00:00 2001 From: Ariel D'Alessandro Date: Fri, 23 Jun 2023 16:43:58 +0200 Subject: add copilot --- lua/alpha/completition/init.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'lua/alpha/completition/init.lua') diff --git a/lua/alpha/completition/init.lua b/lua/alpha/completition/init.lua index 062622a..c511bac 100644 --- a/lua/alpha/completition/init.lua +++ b/lua/alpha/completition/init.lua @@ -36,10 +36,11 @@ cmp.setup { [""] = cmp.mapping.complete(), }, sources = { - { name = "nvim_lua" }, + { name = "nvim_lua", group_index = 2 }, { name = "nvim_lsp" }, { name = "path" }, - { name = "luasnip" }, + { name = "luasnip", group_index = 2 }, + { name = "copilot", group_index = 2 }, -- { name = "nvim_lsp_signature_help" }, { name = "buffer", @@ -49,7 +50,7 @@ cmp.setup { local bufs = {} for _, win in ipairs(vim.api.nvim_list_wins()) do local bufnr = vim.api.nvim_win_get_buf(win) - if vim.api.nvim_buf_get_option(bufnr, 'buftype') ~= 'terminal' then + if vim.api.nvim_buf_get_option(bufnr, "buftype") ~= "terminal" then bufs[bufnr] = true end end @@ -74,6 +75,7 @@ cmp.setup { nvim_lua = "[api]", path = "[path]", luasnip = "[snip]", + copilot = "[ﮧ ]", ["vim-dadbod-completion"] = "[DB]", }, }, @@ -94,6 +96,8 @@ cmp.setup { }, } +vim.api.nvim_set_hl(0, "CmpItemKindCopilot", {fg ="#6CC644"}) + -- Set configuration for specific filetype. cmp.setup.filetype("gitcommit", { sources = cmp.config.sources({ -- cgit v1.2.3