Closed pitkling closed 3 months ago
The first issue should be resolved when package.json definitions are supported via #5
I didn't realize that prefix
was supposed to be optional. This should be a quick fix. Hopefully the issues with $
should be solved with the latest parsing changes. @benelan is correct that using package.json
to setup default language snippets should remove the need to manually setup each languages snippets
@garymjr: Thanks for the quick fix. Anyway, it seems there's still a parsing issue:
- Inline Math and Centered Math (not quite sure what's the offending part here, probably some of the dollar signs used by LaTeX for inline math)
These two still cause errors when loaded by nvim-snippets. If I delete them, it works again. Let me know if I should open a separate issue for this.
The LaTeX snippets from friendly-snippets are not loaded by nvim-snippets when editing LaTeX files (e.g.,
main.tex
). Other file type specific snippets work fine (e.g., lua). Also, the LaTeX snippets from friendly-snippets work in LuaSnip. I'm using nvim-snippets together with nvim-cmp.It seems the problem is that friendly-snippets has LaTeX snippets in
latex.json
and inside thelatex
subdirectory. Those are not loaded bynvim-snippets
when opening a tex file likemain.tex
. Note that neovim uses filetypetex
for LaTeX files. This can be fixed by loading nvim-snippets with:I think this should be default for the tex filetype.
Anyway, even with the above fix the LaTeX snippets cause errors when nvim-snippets tries to load them. I assume these might be errors in the corresponding LaTeX snippets (in that case I will report them to friendly-snippets). But I'm not too familiar with the snippet syntax, so I might be wrong. Anyway, even if they are snippet-errors it would be great if nvim-snippets would handle such problems more gracefully. The problematic LaTeX snippets from friendly-snippets are
After deleting those manually, the remaining LaTeX snippets are loaded and work as expected.
P.S.: Sorry for squeezing this into one issue; let me know if I should split the issue into two separate ones.