diff options
Diffstat (limited to 'fnl/util')
-rw-r--r-- | fnl/util/cmds.fnl | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fnl/util/cmds.fnl b/fnl/util/cmds.fnl new file mode 100644 index 0000000..6ff95a1 --- /dev/null +++ b/fnl/util/cmds.fnl @@ -0,0 +1,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} |