New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing completions after longer period of time #40
Comments
I think I've found the problem. I was using BufOnly plugin to cleanup unused buffers. Unfortunately, it uses |
I'm going to try to use BufOnly.nvim instead and see how it goes. This plugin uses |
Same problem here, using barbar to delete unused buffers |
@otavioschwanck with BufOnly.nvim, it has been working fine for me for a couple of weeks already. |
@lcmen to really fix i did this: -- at lua/valid_lister_buffers.lua
local function return_listed_valid_buffers()
local buffers = vim.api.nvim_list_bufs()
local buffersToUse = {}
local bufferIndex = 1
for i=1,table.getn(buffers),1 do
local buf = buffers[i]
local byte_size = vim.api.nvim_buf_get_offset(buf, vim.api.nvim_buf_line_count(buf))
if not (byte_size > 1024 * 128) and (vim.fn.buflisted(buf) == 1 or vim.fn.getbufvar(buf, '&buftype', 'ERROR') == 'terminal') then -- 1 Megabyte max
buffersToUse[bufferIndex] = buf
bufferIndex = bufferIndex + 1
end
end
return buffersToUse
end
return return_listed_valid_buffers
-- at your config
{ name = "buffer", option = { get_bufnrs = function()
return require('valid_listed_buffers')()
end } } |
@otavioschwanck why do you need custom function? |
with this function i get only the buffers that are really open and the file size uns lower then 128kbs. |
Thank you for the plugin, it's awesome! I've configured it to autocomplete from all the buffers as described in the readme but I've noticed that after having Neovim opened for the whole day, the plugin misses some of the words (sometimes even from the same buffer so I have to fallback to ctrl-x ctrl-n). I'd love to provide more info but I'm not sure how to debug it. Any idea?
Thanks!
The text was updated successfully, but these errors were encountered: