so I’ve been working on a cross editor snippet manager(link to code), and I’m trying to improve the snippet syntax.
I want to make the snippet syntax a superset of that defined by the lsp snippet spec but allow for programmatic snippets, ie the type of snippets that makes ultisnips or its vscode-based descendant hsnips so powerful, but while avoiding supporting arbitrary code execution if possible.
That involves coming up with extra syntax tokens to cover the most useful cases of dynamic snippets. For what I suppose is a lack of imagination, I can’t seem to think of anything beyond char repeat and placeholder list transformation (make
:a:\n,:b:\n,:c:\n like the example in the ultisnips readme.
what are the use cases you guys can think of for programmatic snippets, and how would you like the syntax for that to look?