summaryrefslogtreecommitdiff
path: root/fnl/plugins/init.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/plugins/init.fnl')
-rw-r--r--fnl/plugins/init.fnl25
1 files changed, 15 insertions, 10 deletions
diff --git a/fnl/plugins/init.fnl b/fnl/plugins/init.fnl
index d767506..6b0bde8 100644
--- a/fnl/plugins/init.fnl
+++ b/fnl/plugins/init.fnl
@@ -1,11 +1,16 @@
-;; Returns a list of all plugins.
+;; Load all plugins.
-(let [plugins (require :plugins.lsp)
- path (.. (vim.fn.stdpath :config) :/fnl/plugins)]
- (if (vim.loop.fs_stat path)
- (do
- (each [fname (vim.fs.dir path)]
- (let [fname (fname:match "^(.*)%.fnl$")]
- (if (and (not= fname nil) (not= fname :init) (not= fname :lazy))
- (table.insert plugins (require (.. :plugins. fname))))))))
- plugins)
+(local plugins (let [plugins (require :plugins.lsp)
+ path (.. (vim.fn.stdpath :config) :/fnl/plugins)]
+ (if (vim.loop.fs_stat path)
+ (do
+ (each [fname (vim.fs.dir path)]
+ (let [fname (fname:match "^(.*)%.fnl$")]
+ (if (and (not= fname nil) (not= fname :init)
+ (not= fname :lazy))
+ (table.insert plugins
+ (require (.. :plugins. fname))))))))
+ plugins))
+
+(let [lazy (require :plugins.lazy)]
+ (lazy.setup plugins))