summaryrefslogtreecommitdiff
path: root/fnl/util.fnl
diff options
context:
space:
mode:
authoraktersnurra <grydholm@kth.se>2022-04-24 20:10:28 +0200
committeraktersnurra <grydholm@kth.se>2022-04-24 20:10:28 +0200
commit987f698c932ad75c461b81e035d5eb1788051dd5 (patch)
treecc7770f2e514d5647bf10dc8de7aa2f75c5be449 /fnl/util.fnl
parenta0db1140e12c6254e4f25caa703e46de5f1ef6b3 (diff)
refactor(init): clean up
Diffstat (limited to 'fnl/util.fnl')
-rw-r--r--fnl/util.fnl5
1 files changed, 5 insertions, 0 deletions
diff --git a/fnl/util.fnl b/fnl/util.fnl
index 9054f54..7222ebb 100644
--- a/fnl/util.fnl
+++ b/fnl/util.fnl
@@ -2,8 +2,13 @@
(module util {autoload {nvim aniseed.nvim}})
(def- path (.. (vim.fn.stdpath :data) :/site/pack/packer/start))
+
(def num-plugins (length (vim.fn.readdir path)))
+(defn load-config []
+ (if (> num-plugins 3)
+ (require :config)))
+
(defn load-plugin [name]
(let [(ok? val-or-err) (pcall require name)]
(if ok?