summaryrefslogtreecommitdiff
path: root/fnl/plugins/snippets/workflow.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/plugins/snippets/workflow.fnl')
-rw-r--r--fnl/plugins/snippets/workflow.fnl42
1 files changed, 42 insertions, 0 deletions
diff --git a/fnl/plugins/snippets/workflow.fnl b/fnl/plugins/snippets/workflow.fnl
new file mode 100644
index 0000000..b7f0807
--- /dev/null
+++ b/fnl/plugins/snippets/workflow.fnl
@@ -0,0 +1,42 @@
+(fn workflow-snippets []
+ (let [ls (require :luasnip)
+ fmt (require :luasnip.extras.fmt)]
+ (let [s ls.s
+ i ls.insert_node
+ fmt fmt.fmt]
+ [(s :wf (fmt "workflow \"{}\" =
+ input: {}
+ output (on success):
+ {}
+ output (on error):
+ {}
+
+ // step {}
+ do {}
+ {}
+ " [(i 1) (i 2) (i 3) (i 4) (i 5) (i 6) (i 7)]))
+ (s :st (fmt "
+ // step {}
+ do {}
+ If {}:
+ {}
+
+ "
+ [(i 1) (i 2) (i 3) (i 4)]))
+ (s :ss (fmt "
+substep \"{}\" =
+ input: {}
+ output: {}
+ dependencies: {}
+
+ {}
+ "
+ [(i 1) (i 2) (i 3) (i 4) (i 5)]))])))
+
+(fn add-snippets []
+ (let [ls (require :luasnip)
+ snippets (workflow-snippets)]
+ (ls.add_snippets :org snippets)
+ (ls.add_snippets :markdown snippets)))
+
+{: add-snippets}