summaryrefslogtreecommitdiff
path: root/fnl/util.fnl
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2022-05-01 23:06:03 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2022-05-01 23:06:03 +0200
commitf845a7b0588559750b1cb7eede1b3aecb450cdfe (patch)
tree1c2028e77ef60fb5a00e0abce46a0d4bf66d76d9 /fnl/util.fnl
parent609daf2f632e907f0aed920084b51f608a63edf7 (diff)
style: fmt with fnlfmt
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))))