cmp-buffer
cmp-buffer copied to clipboard
Document if completion from all visible buffers is default or how to set it up
With the defaults and typing Oth I dont get a completion to the word Other in the other open bufffer.
But it is documented. https://github.com/hrsh7th/cmp-buffer#get_bufnrs-type-fun-number
Ah. Why not adding the defaults into https://github.com/hrsh7th/cmp-buffer#configuration like what is the convention for plugins?
I can make a PR, if that would be okay for you.
Mhm, for some reason that did not work and I cant find the symbols from the other file. My session file should not interfere with that and file size is not huge either. Changing the file with saving did not fix it either.
How do I go about using:
get_bufnrs = function()
return vim.api.nvim_list_bufs()
end
To complete from all open buffers?
for people that come here looking:
cmp.setup.cmdline("/", {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{
name = "buffer",
option = {
get_bufnrs = function()
return vim.api.nvim_list_bufs()
end,
},
},
},
})