Configure the nvim-cmp plugin priority and max item count

This commit is contained in:
Kevin MacMartin 2024-03-05 23:56:42 -05:00
parent d997f77832
commit 75b1337274

View file

@ -48,12 +48,40 @@ if (vim.g.enablecompletion == 1) then
}),
sources = cmp.config.sources({
{ name = "buffer" },
{ name = "treesitter" },
{ name = "omni" },
{ name = "async_path" },
{ name = "tags", option = { current_buffer_only = true } },
{ name = "snippy" },
{
name = "snippy",
priority = 4
},
{
name = "async_path",
priority = 3
},
{
name = "buffer",
priority = 3,
max_item_count = 5
},
{
name = "treesitter",
priority = 2,
max_item_count = 5
},
{
name = "omni",
priority = 2,
max_item_count = 5
},
{
name = "tags",
priority = 1,
max_item_count = 5,
option = { current_buffer_only = true },
},
}),
enabled = function()