diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2023-01-08 20:22:49 +0100 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2023-01-08 20:22:49 +0100 |
commit | 31cab8c4624770df1d3ed7c7f7980bc1d6bed8d0 (patch) | |
tree | 81d5660e1172840390a10aa9be500f1be002f972 | |
parent | e4da06e19c072322573c916fa6bdda8827a59e6c (diff) |
Refactor loading of plugins
-rw-r--r-- | fnl/config/init.fnl | 10 | ||||
-rw-r--r-- | fnl/config/lsp/init.fnl | 6 | ||||
-rw-r--r-- | fnl/config/util.fnl | 6 |
3 files changed, 15 insertions, 7 deletions
diff --git a/fnl/config/init.fnl b/fnl/config/init.fnl index b8bbddf..b4bfff5 100644 --- a/fnl/config/init.fnl +++ b/fnl/config/init.fnl @@ -16,9 +16,7 @@ :config.harpoon :config.leap :config.lir - :config.lsp.lspconfig - :config.lsp.mason - :config.lsp.null-ls + :config.lsp :config.lualine :config.minibar :config.neogit @@ -40,7 +38,5 @@ :config.window-picker :config.zen]) -(let [configs []] - (each [_ plugin (pairs plugins)] - (table.insert configs (require plugin))) - configs) +(let [util (require :config.util)] + (util.load plugins)) diff --git a/fnl/config/lsp/init.fnl b/fnl/config/lsp/init.fnl new file mode 100644 index 0000000..6166fa1 --- /dev/null +++ b/fnl/config/lsp/init.fnl @@ -0,0 +1,6 @@ +;; Lsp modules. + +(local plugins [:config.lsp.lspconfig :config.lsp.mason :config.lsp.null-ls]) + +(let [util (require :config.util)] + (util.load plugins)) diff --git a/fnl/config/util.fnl b/fnl/config/util.fnl index dbd635f..e2800a6 100644 --- a/fnl/config/util.fnl +++ b/fnl/config/util.fnl @@ -12,3 +12,9 @@ themes (require :telescope.themes) theme (. opts :theme)] ((. telescope builtin) ((. themes theme) opts)))) + +(defn load [plugins] + (let [configs []] + (each [_ plugin (pairs plugins)] + (table.insert configs (require plugin))) + configs)) |