-
Dear LuaSnip lovers, I'm new to Lua and obviously to LuaSnip. I would like to have a snippet for ConTEXt Lua that changes the output (which might have an insertNode) based on the text in the first insertNode. For example: \start(1) -- (1) is i(1) If i(1) == "itemize", then the output would be: Bellow is what I could come up with:
The function in luasnip-match only returns values as strings. I'm stuck at the part that I would like to jump to and edit, e.g, when I type "itemize", "itemize[a]" would come up, then I could jump into the "[a]" and change "a" to "n" or anything else. With strings as returns of luasnip-match's function, I have to manually jump to "[a]" and change "a" to what I need. If you have any thought, please kindly share with me. Thank you so much in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 11 replies
-
Hi! |
Beta Was this translation helpful? Give feedback.
Hi!
I think you'll want to use dynamicNode, it can generate both text and new insertNodes based on some input.