L3MON4D3 / LuaSnip

Snippet Engine for Neovim written in Lua.
Apache License 2.0
3.4k stars 241 forks source link

Neovim crashes when LuaSnip is used #623

Open pelegs opened 2 years ago

pelegs commented 2 years ago

I've installed LuaSnip and Friendly-Snippets (my config can be found here). When choosing a snippet and pressing return, neovim crashes with the following message: luasnip_error_crash

I ran :checkhealth, but there's no issue there regarding LuaSnip. My system is Arch Linux, neovim version is 0.8.0 (LuaJIT 2.1.0-beta3). I will of course provide more info on request.

pelegs commented 2 years ago

After many tests I found out that this has something to do with coq-luasnip, as it doesn't not happen when I disable it.

L3MON4D3 commented 2 years ago

Ouh, that might be due to unfortunate timing (coq/luasnip removing the same text seems likely atm).. could you insert a few (~20 should be more than enough) spaces (or any other character) into the buffer in front of the cursor and expand? The culprit is probably this line

pelegs commented 2 years ago

Maybe, to be honest I have zero experience with lua in general and neovim related programming in particular so this might take a while for me to figure out...