diff options
Diffstat (limited to 'fnl')
-rw-r--r-- | fnl/aktersnurra.fnl | 22 | ||||
-rw-r--r-- | fnl/plugins/init.fnl | 10 |
2 files changed, 17 insertions, 15 deletions
diff --git a/fnl/aktersnurra.fnl b/fnl/aktersnurra.fnl index f9c7ca2..adf6598 100644 --- a/fnl/aktersnurra.fnl +++ b/fnl/aktersnurra.fnl @@ -1,6 +1,15 @@ ;; Load plugins with lazy. -(local icons (require :icons)) +(local plugins (let [plugins [] + path (.. (vim.fn.stdpath :config) :/fnl/plugins)] + (each [fname (vim.fs.dir path)] + (let [fname (fname:match "^(.*)%.fnl$")] + (if (and (not= fname nil) (not= fname :icons)) + (table.insert plugins (require (.. :plugins. fname)))))) + (table.insert plugins (require :plugins.lsp)) + plugins)) + +(local icons (require :settings.icons)) (local opts {:install {:colorscheme [:no-clown-fiesta]} :debug false @@ -34,7 +43,10 @@ (.. (. icons :star) " ") (.. (. icons :line) " ")]}}}) -(let [lazy (require :lazy) - plugins (require :plugins)] - (vim.keymap.set :n :<leader>y "<cmd>Lazy home<cr>" {:desc :Home}) - (lazy.setup plugins opts)) +(fn init [] + (require :settings) + (let [lazy (require :lazy)] + (vim.keymap.set :n :<leader>y "<cmd>Lazy home<cr>" {:desc :Home}) + (lazy.setup plugins opts))) + +(init) diff --git a/fnl/plugins/init.fnl b/fnl/plugins/init.fnl deleted file mode 100644 index 470776e..0000000 --- a/fnl/plugins/init.fnl +++ /dev/null @@ -1,10 +0,0 @@ -;; Load all plugins. - -(let [plugins [] - path (.. (vim.fn.stdpath :config) :/fnl/plugins)] - (each [fname (vim.fs.dir path)] - (let [fname (fname:match "^(.*)%.fnl$")] - (if (and (not= fname nil) (not= fname :init)) - (table.insert plugins (require (.. :plugins. fname)))))) - (table.insert plugins (require :plugins.lsp)) - plugins) |