aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/alpha/completition/init.lua10
-rw-r--r--lua/plugins/completition.lua13
2 files changed, 20 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({
diff --git a/lua/plugins/completition.lua b/lua/plugins/completition.lua
index 4e2c85d..b0c93d6 100644
--- a/lua/plugins/completition.lua
+++ b/lua/plugins/completition.lua
@@ -11,6 +11,19 @@ return {
"onsails/lspkind-nvim",
{ "L3MON4D3/LuaSnip", version = "v1.*" },
"windwp/nvim-autopairs",
+ {
+ "zbirenbaum/copilot-cmp",
+ dependencies = {
+ "zbirenbaum/copilot.lua",
+ cmd = { "Copilot" },
+ event = { "VeryLazy" },
+ opts = {
+ suggestion = { enabled = false },
+ panel = { enabled = false },
+ },
+ },
+ config = true,
+ },
-- "hrsh7th/cmp-nvim-lsp-signature-help",
},
event = "VeryLazy",