summaryrefslogtreecommitdiff
path: root/fnl/util
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2024-07-29 00:03:28 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2024-07-29 00:03:28 +0200
commitbeb3ed1effdc5dbd047c583598b83615075363b7 (patch)
tree5e49355bd20ac94c1dc19530e0605e6dc6c487bb /fnl/util
parent66f7949711425dc20bfb7612a68d81b5af30b8e9 (diff)
Update how lsp, snippets and plugins are loaded
Diffstat (limited to 'fnl/util')
-rw-r--r--fnl/util/load.fnl8
1 files changed, 8 insertions, 0 deletions
diff --git a/fnl/util/load.fnl b/fnl/util/load.fnl
new file mode 100644
index 0000000..fef9b6e
--- /dev/null
+++ b/fnl/util/load.fnl
@@ -0,0 +1,8 @@
+;; Load file with function
+
+(λ load-and-apply [path f]
+ (each [fname type (vim.fs.dir (.. (vim.fn.stdpath :config) path))]
+ (when (= type :file)
+ (f (fname:match "^(.*)%.fnl$")))))
+
+{: load-and-apply}