I found this error very recently. I am using 'dsznajder/vscode-es7-javascript-react-snippets' in my lua config, but when I confirm my snippet (e.g. type rafc~ for react arrow function component ) in luasnip, the following error occurs.
E5108: Error executing lua .../pack/packer/start/LuaSnip/lua/luasnip/nodes/snippet.lua:764: attempt to concatenate a nil value
stack traceback:
.../pack/packer/start/LuaSnip/lua/luasnip/nodes/snippet.lua:764: in function 'get_static_text'
.../pack/packer/start/LuaSnip/lua/luasnip/nodes/snippet.lua:762: in function 'get_static_text'
...te/pack/packer/start/LuaSnip/lua/luasnip/util/parser.lua:173: in function 'fn'
...k/packer/start/LuaSnip/lua/luasnip/nodes/dynamicNode.lua:129: in function 'update'
.../pack/packer/start/LuaSnip/lua/luasnip/nodes/snippet.lua:807: in function 'update'
.../pack/packer/start/LuaSnip/lua/luasnip/nodes/snippet.lua:486: in function 'trigger_expand'
...nvim/site/pack/packer/start/LuaSnip/lua/luasnip/init.lua:204: in function 'snip_expand'
...e/pack/packer/start/cmp_luasnip/lua/cmp_luasnip/init.lua:142: in function 'execute'
.../nvim/site/pack/packer/start/nvim-cmp/lua/cmp/source.lua:360: in function 'execute'
...e/nvim/site/pack/packer/start/nvim-cmp/lua/cmp/entry.lua:446: in function 'execute'
...re/nvim/site/pack/packer/start/nvim-cmp/lua/cmp/core.lua:463: in function <...re/nvim/site/pack/packer/start/nvim-cm
p/lua/cmp/core.lua:462>
...te/pack/packer/start/nvim-cmp/lua/cmp/utils/feedkeys.lua:47: in function <...te/pack/packer/start/nvim-cmp/lua/cmp/u
tils/feedkeys.lua:45>
After digging into the source code for snippet.lua in line 764, found that this file has been recently updated in commit e2a044f8fa4d8b86b63b4494c257bb1aa7379c97. I tried to revert back to the commit right before it 79b2019c68a2ff5ae4d732d50746c901dd45603a which contains the last version of this file, then the problem is gone. I have also tried to reproduce the same error in a docker container, and the exact problem exists, and can be solved in the exact same way.
FYI, you may reference my full config repo here. My work around on the fix is located here. I am using neovim v0.7. I have tested this problem on Manjaro Linux, MacOS, and a docker container running Arch Linux.
I found this error very recently. I am using 'dsznajder/vscode-es7-javascript-react-snippets' in my lua config, but when I confirm my snippet (e.g. type
rafc~
for react arrow function component ) in luasnip, the following error occurs.After digging into the source code for
snippet.lua
in line 764, found that this file has been recently updated in commite2a044f8fa4d8b86b63b4494c257bb1aa7379c97
. I tried to revert back to the commit right before it79b2019c68a2ff5ae4d732d50746c901dd45603a
which contains the last version of this file, then the problem is gone. I have also tried to reproduce the same error in a docker container, and the exact problem exists, and can be solved in the exact same way.FYI, you may reference my full config repo here. My work around on the fix is located here. I am using neovim v0.7. I have tested this problem on Manjaro Linux, MacOS, and a docker container running Arch Linux.