summaryrefslogtreecommitdiff
path: root/fnl/util
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2023-09-23 22:05:37 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2023-09-23 22:05:37 +0200
commitd474c779523c512e3bc91bc5ce7bc87cafc6372b (patch)
tree3c50cc5bf8fb55167150c76171f54590babf7118 /fnl/util
parent6dcd88cde5825573a3732e8b18f7d663ca47495b (diff)
Move user and auto cmds to plugins
Diffstat (limited to 'fnl/util')
-rw-r--r--fnl/util/cmds.fnl12
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}