nvim cmp priorities

This commit is contained in:
Martin Pander
2025-07-16 09:25:13 +02:00
parent 6a651c6a3d
commit 70c37da9ef
5 changed files with 141 additions and 97 deletions

View File

@ -44,14 +44,14 @@ cmp.setup({
}),
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'vsnip' },
{ name = 'path' },
{ name = 'cmp_yanky' },
{ name = 'git' },
{ name = 'copilot' },
-- }, {
{ name = 'buffer', keyword_length = 2 },
{ name = 'nvim_lsp', priority = 1000 },
{ name = 'buffer', priority = 800, keyword_length = 2 },
{ name = 'copilot', priority = 700 },
{ name = 'path', priority = 600 },
{ name = 'cmp_yanky', priority = 500 },
{ name = 'git', priority = 400 },
{ name = 'vsnip', priority = 300 },
{ name = 'nvim_lua', priority = 200 },
}),
formatting = {