config: nvim: nvim-cmp: consider all buffers as completion sources

This commit is contained in:
Thomas Preisner 2022-10-29 19:14:15 +02:00
parent 0bcdd60bb3
commit 53f83393dc

View file

@ -32,7 +32,15 @@ cmp.setup({
{ name = 'nvim_lsp', keyword_length = 3 }, { name = 'nvim_lsp', keyword_length = 3 },
{ name = 'luasnip', keyword_length = 2 }, { name = 'luasnip', keyword_length = 2 },
}, { }, {
{ name = 'buffer', keyword_length = 3 }, {
name = 'buffer',
keyword_length = 3,
option = {
get_bufnrs = function()
return vim.api.nvim_list_bufs()
end,
},
},
}) })
}) })