summaryrefslogtreecommitdiff
path: root/fnl/util/cmds.fnl
blob: 254a26d3d6954a18cc3450a6bc52aa7ef141856b (plain)
1
2
3
4
5
6
7
8
9
10
11
(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)]
    (match auto-cmd
      [event opts] (vim.api.nvim_create_autocmd event opts))))

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