Open Alex2134556 opened 1 week ago
You have to change the snippet file a bit, e.g. you don't need to write \\sum
anymore to get \sum
and the context query doesn't work anymore.
Try to comment out some snippets to find which don't work, or send your file (or at least some of it) so that we can take a look at it.
Wait the context query doesn't work anymore? Like things like "context math(context)" doesn't work?
Yes, instead of context math(context)
just use the flag m
.
Example
snippet sum "sum" iAm
\sum
endsnippet
Currently there are no other context flags available.
Ahh, I do have some different contexts as well like block_math(context) and text(context). And what about editor queries? Things like "isInlineMath(editor)".
Also why was this changed? I remember, OrangeX4's fork didn't do this: It lets you have the context and greater flexibility with changing it if required.
As far as I know (and I understand the code) the fork of OrangeX4 didn't support context queries as well (at least not in the way as in the original from draivin). And @Oskar-Idland just added the fix for the tabstops until now.
But honestly I am just a user as well...
@Oskar-Idland I see. It might be best to just use draivin’s original code as it lets you use different contexts. You can just copy the OrangeX4’s hypersnips code in your latex hsnips file.
@PapierFliegr is right! We use the math flag instead. As the original from draivin and fork from OrangeX4 has diverged, I would like to unify them to get the best from both. Maybe add more flags, or just context queries. That would be more flexible, but the flags are more neat.
I want to add draivin's improvements to this fork, or add OrangeX's code to draivins code. Whaterver is easiest. If you have something you want to implement, just make a PR!
I found the commit from the original repo with the addition of context support. I'll experiment with adding it later, or you are welcome to add it in a PR:)
Hello,
I am unable to get any snippet working with this extension. Whenever I "Hypersnips: Reload Snippets", it displays
"Command 'Hypersnips: Reload Snippets' resulted in an error: missing ) after argument list".
On the other hand, everything works fine with the draivin's version of Hypersnips.