filter out snippets from completion suggestions
This commit is contained in:
parent
c5798dfa1f
commit
344ba497eb
|
@ -156,6 +156,7 @@ return {
|
||||||
-- So, we create new capabilities with nvim cmp, and then broadcast that to the servers.
|
-- So, we create new capabilities with nvim cmp, and then broadcast that to the servers.
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities())
|
capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities())
|
||||||
|
-- capabilities.textDocument.completion.completionItem.snippetSupport = false
|
||||||
|
|
||||||
-- Enable the following language servers
|
-- Enable the following language servers
|
||||||
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
|
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
|
||||||
|
|
|
@ -107,7 +107,13 @@ return {
|
||||||
-- set group index to 0 to skip loading LuaLS completions as lazydev recommends it
|
-- set group index to 0 to skip loading LuaLS completions as lazydev recommends it
|
||||||
group_index = 0,
|
group_index = 0,
|
||||||
},
|
},
|
||||||
{ name = 'nvim_lsp' },
|
{
|
||||||
|
name = 'nvim_lsp',
|
||||||
|
entry_filter = function(entry, ctx)
|
||||||
|
-- do not show snippets in the completion list
|
||||||
|
return require('cmp').lsp.CompletionItemKind.Snippet ~= entry:get_kind()
|
||||||
|
end,
|
||||||
|
},
|
||||||
{ name = 'luasnip' },
|
{ name = 'luasnip' },
|
||||||
{ name = 'path' },
|
{ name = 'path' },
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue