diff options
| author | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2023-06-23 16:43:58 +0200 |
|---|---|---|
| committer | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2023-06-23 16:43:58 +0200 |
| commit | 655ea643e768ff19a39985d5a627074e6e7abea1 (patch) | |
| tree | 8f200fb46b343e723093c28e6ff1293ed835f9e8 /lua/alpha | |
| parent | 739b2931a2ca1ab5eef9686311990e58d55e34a3 (diff) | |
| download | nvim-conf-655ea643e768ff19a39985d5a627074e6e7abea1.tar.gz nvim-conf-655ea643e768ff19a39985d5a627074e6e7abea1.zip | |
add copilot
Diffstat (limited to 'lua/alpha')
| -rw-r--r-- | lua/alpha/completition/init.lua | 10 |
1 files changed, 7 insertions, 3 deletions
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 { ["<c-space>"] = 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({ |