Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

Completion window causes vim.schedule error #368

Open
Robaire opened this issue May 13, 2021 · 0 comments
Open

Completion window causes vim.schedule error #368

Robaire opened this issue May 13, 2021 · 0 comments

Comments

@Robaire
Copy link

Robaire commented May 13, 2021

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')
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant