Merge pull request #347 from genebean/fix-completions

Stop suggesting random text as a snippet.
This commit is contained in:
Gene Liverman 2024-01-04 17:37:38 -05:00 committed by GitHub
commit a54cbc630d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,8 +23,13 @@ return {
["<CR>"] = cmp.mapping.confirm({ select = true }),
}),
sources = cmp.config.sources({
{ name = "nvim_lsp" },
{ name = "luasnip" }, -- For luasnip users.
{
name = "nvim_lsp",
entry_filter = function(entry)
return require("cmp.types").lsp.CompletionItemKind[entry:get_kind()] ~= "Text"
end,
},
{ name = "luasnip" },
}, {
{ name = "buffer" },
}),