Open Abhinav1217 opened 1 year ago
Great feature request! If you'd like to contribute, have a look at the existing code for the vsnip
parser here. Basically, since sublime snippet contents use the same format as VSCode snippets we can reuse the existing body_parser.
What you'd need to do are the following things:
sublime_text
entry to snippet_engines.lua.converter.lua
and parser.lua
within a new vscode/sublime_text
directory.body_parser
is for). The problem I see here is that sublime_text uses XML files to store snippets. Maybe we should use an existing library like https://github.com/manoelcampos/xml2lua/commits/master.It's fine if you decide to only start with a few of these things - offering to help out is always appreciated! Let me know if you have any questions at any time.
Thanks for the pointer.
I will give it a go this weekend. If it is something beyond my scope, I will let you know so that you can assign someone else on this.
@smjonas I am a beginner to lua so I don't think I would be able to do this to completion by myself, however really interested in knowing if there is any progress on this issue.
edit: if you have very basic snippets that need to be converted checkout krishpy99.pythonanywhere.com, the work is also open-source (https://github.com/krishpy99/snippet-convert) however it is very primitive and I did it only because I was a little lazy to manually convert all of it.
Is it possible to support sublime text's
.sublime-snippet
format. It is basically an XML document with some tags that define the properties of the snippets, (keyboard trigger, scope, language, etc) and a<content><~[CDATA[ ... ]]></content>
block which contains actual snipptes.I can contribute if you could point me to right direction. My exposure for lua is limited to neovim config and conky config, but I can manage my way around with some guidance.