summaryrefslogtreecommitdiff
path: root/fnl/plugins/snippets/org.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/plugins/snippets/org.fnl')
-rw-r--r--fnl/plugins/snippets/org.fnl13
1 files changed, 13 insertions, 0 deletions
diff --git a/fnl/plugins/snippets/org.fnl b/fnl/plugins/snippets/org.fnl
new file mode 100644
index 0000000..a2b2e46
--- /dev/null
+++ b/fnl/plugins/snippets/org.fnl
@@ -0,0 +1,13 @@
+;; Snippets for org files.
+
+(fn add-snippets []
+ (let [ls (require :luasnip)
+ fmt (require :luasnip.extras.fmt)]
+ (let [s ls.s
+ i ls.insert_node
+ fmt fmt.fmt]
+ (ls.add_snippets :org
+ [(s :be
+ (fmt "#+begin_src {}\n{}\n#+end_src" [(i 1) (i 2)]))]))))
+
+{: add-snippets}