LuaSnip
LuaSnip copied to clipboard
Failing to import from_vscode snippets using ~/ syntax
When running
...
require('luasnip.loaders.from_vscode').lazy_load {
paths = {
'~/.config/Code/User/snippets/',
}
...
it does not import from the specified path.
if I
- clone my .config/Code snippets folder to my .config/nvim
- do
require('luasnip.loaders.from_vscode').lazy_load()
It works normally.
I also tried creating a symbolic link to the original config, it works, but would be nice if i didn't have to do that
After reading the docs, it should accept ~/... paths. Am I doing something wrong?
Hi :)
Could you insert ls.log.set_loglevel("info") before the call to lazy_load, open a new instance of neovim, and then call :lua ls.log.open()? There should be some information about lazy-loading, and which path exactly is looked at, I think that should help here :D
Sorry for the delayed response, after reading the logs and re-reading the documentation (Files with the extension jsonc will be parsed as jsonc, json with comments, while *.json are parsed with a regular json parser), I found my problem:
VSCode generates regular .json files WITH comments... that i don't delete, so from_vscode fails trying to read regular jsonc as json.
I'll be closing the issue since it was my fault for not reading the docs properly lol