crispgm / cmp-beancount

nvim-cmp source for beancount accounts
MIT License
36 stars 4 forks source link

Error detected while processing TextChangedI Autocommands for "*" #5

Closed wzyboy closed 1 year ago

wzyboy commented 1 year ago

I encountered errors when using the plugin after updating Neovim from 0.8.x to 0.9.x:

Error detected while processing TextChangedI Autocommands for "*":
Error executing lua callback: ...oy/.vim/plugged/cmp-beancount/lua/cmp_beancount/init.lua:48: bad argument #1 to 'ipairs' (table expected, got nil)
stack traceback:
        [C]: in function 'ipairs'
        ...oy/.vim/plugged/cmp-beancount/lua/cmp_beancount/init.lua:48: in function 'get_items'
        ...oy/.vim/plugged/cmp-beancount/lua/cmp_beancount/init.lua:82: in function 'complete'
        /home/wzyboy/.vim/plugged/nvim-cmp/lua/cmp/source.lua:325: in function 'complete'
        /home/wzyboy/.vim/plugged/nvim-cmp/lua/cmp/core.lua:289: in function 'complete'
        /home/wzyboy/.vim/plugged/nvim-cmp/lua/cmp/core.lua:169: in function 'callback'
        /home/wzyboy/.vim/plugged/nvim-cmp/lua/cmp/core.lua:219: in function 'autoindent'
        /home/wzyboy/.vim/plugged/nvim-cmp/lua/cmp/core.lua:161: in function 'on_change'
        /home/wzyboy/.vim/plugged/nvim-cmp/lua/cmp/init.lua:313: in function 'callback'
        ...e/wzyboy/.vim/plugged/nvim-cmp/lua/cmp/utils/autocmd.lua:49: in function 'emit'
        ...e/wzyboy/.vim/plugged/nvim-cmp/lua/cmp/utils/autocmd.lua:23: in function <...e/wzyboy/.vim/plugged/nvim-cmp/lua/cmp/utils/autocmd.lua:22>

I tried downgrading Neovim but the error persists.

Neovim version:

NVIM v0.9.0
Build type: Release
LuaJIT 2.1.0-beta3

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

nvim-cmp version:

Lastest commit on default branch (1cad30f)

wzyboy commented 1 year ago

Found the issue. My g:python3_host_prog venv is broken. It's not related to cmp-beancount. Sorry.