completion-nvim
completion-nvim copied to clipboard
Completion window causes vim.schedule error
Completion frequently causes the error: Error executing vim.schedule lua callback: /opt/neovim/runtime/lua/vim/lsp/util.lua:1025: Failed to switch to window 10--)
In my case this seems to happen only when loading completions for OpenCV and when typing quickly. My theory is that I am typing faster than the completions are loading (slowly since OpenCV is large), and effectively the window no longer exists when necessary.
Minimal init.lua
require('packer').startup(function()
use 'wbthomason/packer.nvim'
use 'neovim/nvim-lspconfig'
use 'nvim-lua/completion-nvim'
end)
require('lspconfig').clangd.setup{}
vim.api.nvim_set_keymap('i', '<Tab>', 'pumvisible() ? "<C-n>" : "<Tab>"', {noremap = true, expr = true})
vim.api.nvim_set_keymap('i', '<S-Tab>', 'pumvisible() ? "<C-n>" : "<S-Tab>"', {noremap = true, expr = true})
vim.api.nvim_command('au BufEnter * lua require\'completion\'.on_attach()')
vim.api.nvim_command('set completeopt=menuone,noinsert,noselect')