diff --git a/lua/init-cmp.lua b/lua/init-cmp.lua index 775bc99..6e42a8e 100644 --- a/lua/init-cmp.lua +++ b/lua/init-cmp.lua @@ -36,7 +36,14 @@ cmp.setup({ sources = { {name = 'nvim_lsp', max_item_count = 8, keyword_length = 3}, {name = 'path'}, - {name = 'buffer', keyword_length = 4, max_item_count = 20}, + {name = 'buffer', + option = { + keyword_length = 4, + max_item_count = 20, + get_bufnrs = function() + return vim.api.nvim_list_bufs() + end + }}, {name = 'ultisnips', priority_weight = 10, keyword_length = 1} } })