summaryrefslogtreecommitdiff
path: root/fnl/plugins/snippets/org.fnl
blob: 460e44c054a00abee80c4ebb08026a2d1bd14dfb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
;; Snippets for org files.

(λ 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}