Stop suggesting random text as a snippet.

https://stackoverflow.com/questions/73092651/neovim-how-to-filter-out-text-snippets-from-nvim-lspconfig-nvim-cmp#comment129185571_73144320
lead me to https://github.com/hrsh7th/nvim-cmp/pull/1067 which fixed the
wonky mess that was happening.
This commit is contained in:
Gene Liverman 2024-01-04 17:35:05 -05:00
parent bf76d27b90
commit 4d87744117

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" },
}),