Closed nyngwang closed 1 year ago
Mhm, the add_snippets
call is a bit wrong, if it gets nil
for the filetype, the snippet-table should have the format {ft1 = {<snippets>}, ft2 = {<snippets>}}
.
Try passing "all"
instead of nil
@L3MON4D3 Lol, thank you! That's the config I copy-pasted from TJ. Now it works:
I'm not sure whether you know TJ made a nice video to promote your plugin, but you(ok maybe me) definitely need to notify him and the viewers(e.g. me) maybe from the comment section to let them know that some of the syntaxes are deprecated. E.g. in the video he used the old syntax to add snippets:
luasnip.snippets = {
-- ...
}
That is: I followed the video, which is the reason why I created this issue. Apparently, the tutorial didn't work for me.
Nice :+1: Yeah, we do mention that in the README, but I guess that's not suuuper discoverable :sweat_smile:
OK, I'm blind: https://github.com/L3MON4D3/LuaSnip#resources-for-new-users. 🤣 Closing this!
I don't know what I did wrong, but none of my
keymap
s cannot trigger a single snip. I also did all the default setup provided by the README of nvim-cmp, doesn't help.