Does not work well with `set nohidden`
First of all, great plugin, I really love nvim-cmp.
So, I tried to enable completion for multiple buffers with:
get_bufnrs = function() return vim.api.nvim_list_bufs() end
Didn't work. Or rather, was weirdly buggy and sometimes worked, sometimes didn't. Long story short, the mechanism for indexing files doesn't work unless set hidden is set. I spent a few hours debugging until I figured out why the source get buffers with no words in them.
I appreciate that making it work for set nohidden will add a lot of complexity, and that maybe set hidden is a better default. May I suggest it's at least added to the README that is required for the plugin to function?
:set hidden unloads the hidden buffers when they are abandoned, and unloading the buffer frees its contents from the memory, so cmp-buffer simply cannot see what's inside the buffer.