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

View File

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