nvim/cmp: precedence

This commit is contained in:
Primrose 2025-07-09 11:34:03 +02:00
parent f901002774
commit 5d4e1547c5
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA

View file

@ -29,18 +29,13 @@ cmp.setup {
expand = function(args) luasnip.lsp_expand(args.body) end, expand = function(args) luasnip.lsp_expand(args.body) end,
}, },
mapping = cmp.mapping.preset.insert(), mapping = cmp.mapping.preset.insert(),
-- TODO: how can I make some take precedence of others? sources = cmp.config.sources({
sources = {
{ name = "luasnip" }, { name = "luasnip" },
{ name = "nvim_lsp" }, { name = "nvim_lsp" },
{ name = "path" }, { name = "path" },
{ name = "buffer" }, },
{ {
name = "spell", { name = "buffer" },
keyword_length = 10, -- PERF: { name = "spell", },
option = { }),
keep_all_entries = true,
},
},
},
} }