summaryrefslogtreecommitdiff
path: root/fnl
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2023-07-12 23:35:38 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2023-07-12 23:35:38 +0200
commit94a169b5b754fbc02b6f34fe82c003d11e3c5dd4 (patch)
tree6bc0b7f53826ac37c294e18d0c1f03d181fb1e41 /fnl
parentc193d5d958a88e66783b994f9378de83f7f532f3 (diff)
Refactor plugin loading
Diffstat (limited to 'fnl')
-rw-r--r--fnl/plugins/init.fnl20
1 files changed, 10 insertions, 10 deletions
diff --git a/fnl/plugins/init.fnl b/fnl/plugins/init.fnl
index 4ec20ca..66ec1e9 100644
--- a/fnl/plugins/init.fnl
+++ b/fnl/plugins/init.fnl
@@ -1,14 +1,14 @@
;; Load all plugins.
-(fn get-plugins []
- (let [plugins []
- path (.. (vim.fn.stdpath :config) :/fnl/plugins/editor)]
- (each [fname (vim.fs.dir path)]
- (let [fname (fname:match "^(.*)%.fnl$")]
- (table.insert plugins (require (.. :plugins.editor. fname)))))
- (table.insert plugins (require :plugins.lsp))
- (table.insert plugins (require :plugins.core.hotpot))
- plugins))
+(local plugins (let [plugins []
+ path (.. (vim.fn.stdpath :config) :/fnl/plugins/editor)]
+ (each [fname (vim.fs.dir path)]
+ (let [fname (fname:match "^(.*)%.fnl$")]
+ (table.insert plugins
+ (require (.. :plugins.editor. fname)))))
+ (table.insert plugins (require :plugins.lsp))
+ (table.insert plugins (require :plugins.core.hotpot))
+ plugins))
(let [lazy (require :plugins.core.lazy)]
- (lazy.setup (get-plugins)))
+ (lazy.setup plugins))