hsnips
hsnips copied to clipboard
Random Snippets don't work
I have a couple of snippets, those who are automatically expanded still work but after adding global context for math environments in latex, all of non automatic ones have stopped working. I have started at the file hard and failed to find any problem with it so it must be Hsnips fault, or I am missing something again, in which case I would like some guidance on how to solve this problem.
Update: Even making them automatic doesn't make them work.
Could you send me a snippet file which has snippets that don't work? That would be a great help in finding the issue.
The basic setup is found by importing the hsnips from Einlar/latex_snippets then adding the math environment you created in one of these threads.
The problem is solved after I have specified the math environment using another user's code but honestly it felt like yours should have worked just fine @draivin
Still, if you could share a snippet that does not work consistently, and the user's code that seems to have fixed it, that would be great to see where the problem lies.
The basic setup is found by importing the hsnips from Einlar/latex_snippets then adding the math environment you created in one of these threads.
The problem is solved after I have specified the math environment using another user's code but honestly it felt like yours should have worked just fine @draivin
Would you be so kind and send me this user's code since I encountered the same problem?
@draivin when I have something like $\text{}$
, how can I make my snippets not trigger even though I'm in a math environment, since \text{}
clearly implies that I only want to write some text?
@draivin when I have something like
$\text{}$
, how can I make my snippets not trigger even though I'm in a math environment, since\text{}
clearly implies that I only want to write some text?
global
function math(context) {
return context.scopes.some(s => s.startsWith("meta.math")) && !context.scopes.some(s => s.startsWith("comment"));
}
endglobal
Same problem! But I 'm not sure when it happens
I believe this was related to the scope cache getting stale, so it should be better as of the latest version. Please let me know if you still have these issues.
does it fix in 0.2.8 or not?
i still have this issue