mirror of
https://github.com/genebean/dots.git
synced 2026-03-27 09:27:44 -04:00
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:
parent
bf76d27b90
commit
4d87744117
1 changed files with 7 additions and 2 deletions
|
|
@ -23,8 +23,13 @@ return {
|
||||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||||
}),
|
}),
|
||||||
sources = cmp.config.sources({
|
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" },
|
{ name = "buffer" },
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue