diff options
Diffstat (limited to 'lua/alpha/completition.lua')
| -rw-r--r-- | lua/alpha/completition.lua | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lua/alpha/completition.lua b/lua/alpha/completition.lua index 987763d..730004e 100644 --- a/lua/alpha/completition.lua +++ b/lua/alpha/completition.lua @@ -39,7 +39,19 @@ cmp.setup { { name = "nvim_lsp" }, { name = "path" }, { name = "luasnip" }, - { name = "buffer", keyword_length = 5 }, + { + name = "buffer", + keyword_length = 5, + option = { + get_bufnrs = function() + local bufs = {} + for _, win in ipairs(vim.api.nvim_list_wins()) do + bufs[vim.api.nvim_win_get_buf(win)] = true + end + return vim.tbl_keys(bufs) + end + } + }, }, snippet = { |