LuaSnip
LuaSnip copied to clipboard
Convert UltiSnips snippets that are heavily based on advanced python parsing into LuaSnip
For a while, I've been wanting to migrate from UltiSnips to LuaSnip. But, my snippets rely heavily on advanced python setup (my snippets and its dependencies).
I only really care about the latex snippets, but how can I convert them into LuaSnips? I asked this question and @L3MON4D3 responded by saying all the python snippets have to be re-written in lua. How can I do that?
Thanks a ton!
I'm afraid you'll have to get started from (almost) 0 :/
Might be you can reuse some Python-bits by accessing them through vim.fn.pyeval, snippets without Python could be converted using snippet-converter.
For learning about luasnip, here are some great videos on YouTube (do note, we had some breaking changes after TJ made his videos, snippets are added via add_snippets now), those should get you started pretty quickly.
Also, DOC.md is pretty complete, though not as beginner friendly as it could be.
If you have specific questions about some specific snippet, those are easier to help with, ask away :D
Alright. I'll start converting, and when I run into an issue, I'll ask here.
Haha, I'm doing the same thing as well - let's get through this together. I've been slowly updating my snippets here; if you find something helpful, feel free to yank it for your own use.
P.S. perhaps we could make a megathread somewhere?
@evesdropper Do you want to join my discord server?
If that helps and can be a public forum for doing this task, sure. Otherwise, I think a thread like this here or a megathread on Reddit if possible would probably be better.
Maybe a discussion? Better than an issue since there can be separate smaller threads (As answer+comments) Alternatively, general advice for converting could live in the wiki, I think that would be nice :D
+1 for discussion. Not sure how to create one though.
Alternatively, general advice for converting could live in the wiki, I think that would be nice :D
Once I get good that would be a great idea. I have some starter snippets for creating snippets and can do a few things but I'm far from knowledgeable :laughing:
Opened one here for now :D https://github.com/L3MON4D3/LuaSnip/discussions/545
Once I get good that would be a great idea. I have some starter snippets for creating snippets and can do a few things but I'm far from knowledgeable :laughing:
I think there's value in giving advice before you're "good", especially in this case since most ppl converting ultisnippets will be beginners when it comes to luasnip (different perspective, you know what confused you/tripped you up/was hard to understand at first)