summaryrefslogtreecommitdiff
path: root/fnl/util/cmds.fnl
blob: 6ff95a160b88fd7c20ac4fa29d8177082ef22320 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
(fn create-user-cmds [user-cmds]
  (each [_ user-cmd (ipairs user-cmds)]
    (match user-cmd
      [event cmd opts] (vim.api.nvim_create_user_command event cmd opts))))

(fn create-auto-cmds [auto-cmds]
  (each [_ auto-cmd (ipairs auto-cmds)]
    ; (print (vim.inspect auto-cmd))
    (match auto-cmd
      [event opts] (vim.api.nvim_create_autocmd event opts))))

{: create-user-cmds : create-auto-cmds}