summaryrefslogtreecommitdiff
path: root/fnl/plugins/init.fnl
blob: 6b0bde83e806aa2bbd6a98904e2eb84bf8523457 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
;; Load all 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))