Closed mhogeveen closed 6 months ago
Just received another more detailed error message:
Error executing vim.schedule lua callback: ...local/share/nvim/lazy/nvim-cmp/lua/cmp/utils/snippet.lua:27: attempt to call field 'list_contains' (a nil value)
stack traceback:
...local/share/nvim/lazy/nvim-cmp/lua/cmp/utils/snippet.lua:27: in function 'parser'
...local/share/nvim/lazy/nvim-cmp/lua/cmp/utils/snippet.lua:61: in function 'parser'
...local/share/nvim/lazy/nvim-cmp/lua/cmp/utils/snippet.lua:134: in function 'parser'
...local/share/nvim/lazy/nvim-cmp/lua/cmp/utils/snippet.lua:112: in function 'parser'
...local/share/nvim/lazy/nvim-cmp/lua/cmp/utils/snippet.lua:61: in function 'snippet'
...local/share/nvim/lazy/nvim-cmp/lua/cmp/utils/snippet.lua:405: in function 'parse'
...geveen/.local/share/nvim/lazy/nvim-cmp/lua/cmp/entry.lua:128: in function 'callback'
.../.local/share/nvim/lazy/nvim-cmp/lua/cmp/utils/cache.lua:38: in function 'get_word'
...geveen/.local/share/nvim/lazy/nvim-cmp/lua/cmp/entry.lua:79: in function 'callback'
.../.local/share/nvim/lazy/nvim-cmp/lua/cmp/utils/cache.lua:38: in function 'get_offset'
...eveen/.local/share/nvim/lazy/nvim-cmp/lua/cmp/source.lua:353: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
I have same question.
@szsdk Good to know that fixes the issue. I don't think nightly should be required to be able to use nvim-cmp
however. There isn't any indication of that in the readme as far as I'm aware. If it is required it should probably be stated somewhere.
I encountered the same issue. Pinning nvim-cmp to commit b356f2c in my Lazy config fixes it for now so I can keep working.
Same issue here running nvim v0.9.6, pinning to b356f2c did indeed fix the issue. Thanks @the0val !
Thanks!!! Blazingly fast
@hrsh7th Hi, I see your fix in https://github.com/hrsh7th/nvim-cmp/commit/630cdf7d547c4461ef6d7362c3794a08abfad4fb
However, I now have the following error originating from the code:
nvim-cmp/lua/cmp/utils/snippet.lua:29: attempt to call field 'contains' (a nil value)
It repeated gives me this error for every character I type. Weirdly, if I wait for like 5 seconds before I type anything, it's all fine. I'm on nightly if that matters, specifically NVIM v0.10.0-dev-3096+g17c89eac1
@hrsh7th Hi, I see your fix in 630cdf7
However, I now have the following error originating from the code:
nvim-cmp/lua/cmp/utils/snippet.lua:29: attempt to call field 'contains' (a nil value)
It repeated gives me this error for every character I type. Weirdly, if I wait for like 5 seconds before I type anything, it's all fine. I'm on nightly if that matters, specifically
NVIM v0.10.0-dev-3096+g17c89eac1
Same problem here. Did you find a solution?
@redtechtiger I've been free of this bug for a while. I'm on the release version of neovim ever since 10.0 dropped:
$ nvim --version
NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1713484068
Hmm, odd. Could it be that I'm running MacOS somehow? Never had this issue on my Linux rig or my Windows rig. Currently running Neovim nightly from Homebrew. Also worth noting is that the bug only occurs spuriously, and goes away when I restart Neovim. Thanks for letting me know though!
$ nvim --version
NVIM v0.11.0-dev-422+g3c803483a-Homebrew
Build type: Release
LuaJIT 2.1.1720049189
EDIT: Apparently I can't format code correctly 😅
Hmm, odd. Could it be that I'm running MacOS somehow? Never had this issue on my Linux rig or my Windows rig. Currently running Neovim nightly from Homebrew. Also worth noting is that the bug only occurs spuriously, and goes away when I restart Neovim. Thanks for letting me know though!
$ nvim --version NVIM v0.11.0-dev-422+g3c803483a-Homebrew Build type: Release LuaJIT 2.1.1720049189
EDIT: Apparently I can't format code correctly 😅
I'm on MacOS too and pinning to the latest version fixed the issue
I am also having this issue on debian with commit ae644fe with stable nvim
I'm having this as well.. tried several different VIM versions, from 0.9 until current from source build
NVIM v0.11.0-dev-826+g2276743cb
Build type: Debug
LuaJIT 2.1.1724512491
nvim-cmp is at ae644fe
This is happening all the time for me, on all files in my project :(
I'm on linux
Odd. Been running on Linux for a while now and no issues so far.
NVIM v0.10.1
Build type: RelWithDebInfo
LuaJIT 2.1.1725453128
nvim-cmp/lua/cmp/utils/snippet.lua:29: attempt to call field 'contains' (a nil value)
I'm now having this problem again
my nvim-cmp version is
branch main
commit ae644fe
and my neovim version is
NVIM v0.10.0-dev-3096+g17c89eac1
Build type: RelWithDebInfo
LuaJIT 2.1.1713484068
Pinning to b356f2c does fix the issue for me.
Temporary fix by @the0val: https://github.com/hrsh7th/nvim-cmp/issues/1858#issuecomment-2014660238
FAQ
Announcement
Minimal reproducible full config
Description
After updating to b7b2c12610e18810f95b3d87d673ce6e72ece916 or later, cmp emits the following error: ...local/share/nvim/lazy/nvim-cmp/lua/cmp/utils/snippet.lua:27: attempt to call field 'list_contains' (a nil value). This is not expected
Steps to reproduce
Update to b7b2c12610e18810f95b3d87d673ce6e72ece916 and use cmp
Expected behavior
As described in the description
Actual behavior
As described in the description
Additional context
No response