sourcegraph / sg.nvim

Experimental Sourcegraph + Cody plugin for Neovim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Autocomplete error with cody and cmp: bad argument #1 to 'ipairs' (table expected, got nil)

burmudar opened this issue · comments

I encountered this while editing a nix file, autocomplete has been working fine in other files like go.

Error detected while processing TextChangedI Autocommands for "*":
Error executing lua callback: ...site/pack/packer/start/sg.nvim/lua/sg/extensions/cmp.lua:94: bad argument #1 to 'ipairs' (table expected, got nil)
stack traceback:
        [C]: in function 'ipairs'
        ...site/pack/packer/start/sg.nvim/lua/sg/extensions/cmp.lua:94: in function 'callback'
        .../site/pack/packer/start/sg.nvim/lua/sg/cody/commands.lua:64: in function 'start'
        .../nvim/site/pack/packer/start/sg.nvim/lua/sg/cody/rpc.lua:206: in function 'autocomplete'
        .../site/pack/packer/start/sg.nvim/lua/sg/cody/commands.lua:58: in function 'autocomplete'
        ...site/pack/packer/start/sg.nvim/lua/sg/extensions/cmp.lua:87: in function 'complete'

This was actually due to me having nodejs 16 outside of the mono repo 🤦🏼

Yeah :/ We're working on moving the version back in the cody repo, so that should hopefully not happen soon!