diff options
| author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2024-07-29 00:03:28 +0200 |
|---|---|---|
| committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2024-07-29 00:03:28 +0200 |
| commit | beb3ed1effdc5dbd047c583598b83615075363b7 (patch) | |
| tree | 5e49355bd20ac94c1dc19530e0605e6dc6c487bb /fnl/aktersnurra.fnl | |
| parent | 66f7949711425dc20bfb7612a68d81b5af30b8e9 (diff) | |
Update how lsp, snippets and plugins are loaded
Diffstat (limited to 'fnl/aktersnurra.fnl')
| -rw-r--r-- | fnl/aktersnurra.fnl | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/fnl/aktersnurra.fnl b/fnl/aktersnurra.fnl index f86c2a2..898c454 100644 --- a/fnl/aktersnurra.fnl +++ b/fnl/aktersnurra.fnl @@ -1,17 +1,16 @@ ;; Load plugins with lazy. -(local plugins (let [plugins [] - path (.. (vim.fn.stdpath :config) :/fnl/plugins)] - (each [fname (vim.fs.dir path)] - (let [fname (fname:match "^(.*)%.fnl$")] - (if (not= fname nil) - (table.insert plugins (require (.. :plugins. fname)))))) - (table.insert plugins (require :plugins.lsp)) - (table.insert plugins (require :plugins.snippets)) - plugins)) +(λ load-plugin [tbl name] + (table.insert tbl (require (.. :plugins. name)))) (local icons (require :settings.icons)) +(local {: load-and-apply} (require :util.load)) + +(local plugins (let [tbl {}] + (load-and-apply :/fnl/plugins (partial load-plugin tbl)) + tbl)) + (local opts {:install {:colorscheme [:no-clown-fiesta]} :debug false :defaults {:lazy false} |