summaryrefslogtreecommitdiff
path: root/fnl/plugins/snippets/org.fnl
blob: a2b2e4637bfd91d360fc6539924655c3213293e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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}