summaryrefslogtreecommitdiff
path: root/fnl/util.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/util.fnl')
-rw-r--r--fnl/util.fnl36
1 files changed, 16 insertions, 20 deletions
diff --git a/fnl/util.fnl b/fnl/util.fnl
index c624f64..97a3cdc 100644
--- a/fnl/util.fnl
+++ b/fnl/util.fnl
@@ -1,31 +1,27 @@
;; Utility functions.
-(module util
- {autoload {a aniseed.core
- nvim aniseed.nvim
- packer packer
- plugins plugins}})
+(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 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))))))
+ (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)))
+(defn load-config [] (if (> num-plugins 3)
+ (require :config)))
(defn load-plugin [name]
- (let [(ok? val-or-err) (pcall require name)]
- (if ok?
- val-or-err
- (vim.notify
- (.. "Could not load config: " val-or-err)
- vim.log.levels.WARN))))
+ (let [(ok? val-or-err) (pcall require name)]
+ (if ok?
+ val-or-err
+ (vim.notify (.. "Could not load config: " val-or-err)
+ vim.log.levels.WARN))))