Bryley/neoai.nvim

Click inside main panel causes error

mattiasbonte opened this issue · 2 comments

Hi,

I experience issues when clicking inside the main panel where the ai helper is outputting it's information.

OS: Macos
nvim: neovim nightly

Error:

Error executing vim.schedule lua callback: ...nte/.local/share/nvim/lazy/promise-async/lua/promise.lua:206: attempt to call global 'error' (a number value)
stack traceback:
        ...nte/.local/share/nvim/lazy/promise-async/lua/promise.lua:206: in function <...nte/.local/share/nvim/lazy/promise-async/lua/promise.lua:198>

Why am I doing this:

  • It's often very much needed to copy paste a piece of code generated by the ai, instead of also getting all the written text in the actual code I'd rather copy paste the relevant pieces manually.

Step to reproduce.

  • Select some code. Execute :NeoAIContext. Type the query. Click inside the chat bot output panel.
  • This produces the promise-async error.

As soon as this error is thrown, whenever I open other panels like for example neo-tree the error keeps popping up. Often as bad as whenever I exit out of insert mode it pops the error.

Any idea what might cause this?

Thanks for your effort on this, it's a cool plug!

Hey thanks for your feedback, I can't seem to replicate the error when I click in the output buffer.

Does this error occur on a minimal config with no other plugins enabled?

I have also encountered this issue, and it appears to be related to the context functionality. I've recorded a video to demonstrate this problem. One thing I've noticed is that it seems to be related to LazyVim somehow, because this issue does not occur when using pure Neovim.

Apr-16-2023 17-49-38