From beb3ed1effdc5dbd047c583598b83615075363b7 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Mon, 29 Jul 2024 00:03:28 +0200 Subject: Update how lsp, snippets and plugins are loaded --- fnl/util/load.fnl | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 fnl/util/load.fnl (limited to 'fnl/util/load.fnl') 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} -- cgit v1.2.3-70-g09d2