summaryrefslogtreecommitdiff
path: root/fnl/util.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/util.fnl')
-rw-r--r--fnl/util.fnl15
1 files changed, 14 insertions, 1 deletions
diff --git a/fnl/util.fnl b/fnl/util.fnl
index 7222ebb..c624f64 100644
--- a/fnl/util.fnl
+++ b/fnl/util.fnl
@@ -1,10 +1,23 @@
;; Utility functions.
-(module util {autoload {nvim aniseed.nvim}})
+(module util
+ {autoload {a aniseed.core
+ nvim aniseed.nvim
+ packer packer
+ plugins plugins}})
(def- path (.. (vim.fn.stdpath :data) :/site/pack/packer/start))
(def num-plugins (length (vim.fn.readdir path)))
+(defn sync []
+ (if (= num-plugins 3)
+ (packer.sync)))
+
+(defn install []
+ (packer.startup (fn [use]
+ (each [plugin opts (pairs plugins.plugins)]
+ (use (a.assoc opts 1 plugin))))))
+
(defn load-config []
(if (> num-plugins 3)
(require :config)))