fixed copilot

This commit is contained in:
Oliver Hartmann 2024-09-23 09:07:56 +02:00
parent 0e0308a42d
commit ed34613fe5
2 changed files with 8 additions and 3 deletions

View File

@ -94,7 +94,7 @@ return {
end,
},
sources = {
{ name = "copilot", group_index = 2 },
{ name = 'copilot', priority = 9 },
{ name = 'codeium' },
{ name = 'luasnip', priority = 8 },
{
@ -163,7 +163,10 @@ return {
format = function(entry, vim_item)
local kind = lspkind.cmp_format({
mode = 'symbol',
symbol_map = { Codeium = '', Copilot = "", },
symbol_map = {
Codeium = '',
Copilot = '',
},
maxwidth = 50,
})(entry, vim_item)
local strings = vim.split(kind.kind, '%s', { trimempty = true })
@ -173,6 +176,7 @@ return {
},
-- experimental = { native_menu = true }
})
vim.api.nvim_set_hl(0, "CmpItemKindCopilot", {fg ="#6CC644"})
-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline({ '/', '?' }, {

View File

@ -16,9 +16,10 @@ return {
cpp = true,
['.'] = false,
},
suggestion = { enabled = false },
suggestion = { enabled = false, auto_trigger = false },
panel = { enabled = false },
})
end,
require("copilot_cmp").setup()
}