Allow for trigger of snippet inside dynamic node from pr #1137: "Allow self-dependent dynamicNode" #1164
-
I was looking at #1137 and adjusted the example to my needs: s('test', {
d(1, function(args)
if args[1] and args[1][1] and string.match(args[1][1], '[^%w\\]') then
return sn(nil, { t('{ '), i(1, args[1], { key = 'inner' }), t(' }') })
else
return sn(nil, { i(1, args[1], { key = 'inner' }) })
end
end, { opt_arg(k('inner')) }),
}), The purpose of this snippet is to add curly braces when anything other than an optional backslash followed by one or more word characters is typed. This would be great for latex snippets, but the dynamic node doesn't update anymore after triggering another snippet inside. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Ohh, thanks for reporting that, yeah, there's some bad logic in there, I'll look into it :) |
Beta Was this translation helpful? Give feedback.
Ohh, thanks for reporting that, yeah, there's some bad logic in there, I'll look into it :)