From d474c779523c512e3bc91bc5ce7bc87cafc6372b Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Sat, 23 Sep 2023 22:05:37 +0200 Subject: Move user and auto cmds to plugins --- fnl/util/cmds.fnl | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 fnl/util/cmds.fnl (limited to 'fnl/util/cmds.fnl') 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} -- cgit v1.2.3-70-g09d2