diff options
author | aktersnurra <grydholm@kth.se> | 2022-04-30 18:06:40 +0200 |
---|---|---|
committer | aktersnurra <grydholm@kth.se> | 2022-04-30 18:06:40 +0200 |
commit | 86cfff221bd1d70d1b8e6860b3078b159b995c18 (patch) | |
tree | d389e8587c6d8fd3485b8872e9fdbe83fdfad5f9 /fnl/util.fnl | |
parent | 04a2de0ea4f54ea38b7d24f35eaebded352e33a5 (diff) |
refactor(install): mv install to util module
Diffstat (limited to 'fnl/util.fnl')
-rw-r--r-- | fnl/util.fnl | 15 |
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))) |