You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am about to transfer an UltiSnip snippet to a LuaSnip snippet, also with some python code inside but i don't really understand how to tranlate them. The Snippet is written for LaTeX.
I will give the snippets numbers (*), *=1,2,3,...,13 so that, if you know how to translate a snippet, that you could please give the number and translate it or explain me if and how it would be equivalent implemented in LuaSnip. The more I understand it the better. xD
Many thanks in advance :)
When its finished, i will upload it to my GitHub if you are interested. The OG Version if from Gilles Castels GitHub who explains his snippets on his Website quite well.
The Doc of UltiSnips
I can also take some that I have translated myself, e.g. (12) and (13) the fraction snippet. Not going to go into a lot of detail as there are guides online, including some I've written. The key is that the snip.rv value is replaced by a dynamic node that generates the text based on the Lua equivalent of the Python function in the first one takes the capture and returns a list of nodes. As for the second one, LuaSnip's equivalent of match.group(n) is snip.captures[n], and you can write a function node as I have done to return the capture.
Note also both of these use more complex regex than Lua patterns; thus I've updated the value regTrig = true for regex trigger and trigEngine = ecma for ecma regex, which is similar to Python's regex.
Heyo!!
I am about to transfer an UltiSnip snippet to a LuaSnip snippet, also with some python code inside but i don't really understand how to tranlate them. The Snippet is written for LaTeX.
I will give the snippets numbers (*), *=1,2,3,...,13 so that, if you know how to translate a snippet, that you could please give the number and translate it or explain me if and how it would be equivalent implemented in LuaSnip. The more I understand it the better. xD
Many thanks in advance :)
When its finished, i will upload it to my GitHub if you are interested. The OG Version if from Gilles Castels GitHub who explains his snippets on his Website quite well.
The Doc of UltiSnips
The text was updated successfully, but these errors were encountered: