summaryrefslogtreecommitdiff
path: root/fnl
diff options
context:
space:
mode:
Diffstat (limited to 'fnl')
-rw-r--r--fnl/config/lsp/init.fnl7
-rw-r--r--fnl/config/lsp/lsp-installer.fnl10
2 files changed, 9 insertions, 8 deletions
diff --git a/fnl/config/lsp/init.fnl b/fnl/config/lsp/init.fnl
index 5ec20c1..6e7473d 100644
--- a/fnl/config/lsp/init.fnl
+++ b/fnl/config/lsp/init.fnl
@@ -1,8 +1,7 @@
;; Loads the LSP functionality.
(module config.lsp.init {autoload {util util}})
-(let [_ (util.load-plugin :lspconfig)]
- (require :config.lsp.lsp-installer)
- (let [handlers (require :config.lsp.handlers)]
+(let [handlers (require :config.lsp.handlers)]
(handlers.setup))
- (require :config.lsp.null-ls))
+(require :config.lsp.lsp-installer)
+(require :config.lsp.null-ls)
diff --git a/fnl/config/lsp/lsp-installer.fnl b/fnl/config/lsp/lsp-installer.fnl
index af9a4e8..0b9ebe4 100644
--- a/fnl/config/lsp/lsp-installer.fnl
+++ b/fnl/config/lsp/lsp-installer.fnl
@@ -24,7 +24,9 @@
:sumneko_lua (sumneko-lua-opts)
_ handler-opts))
-(let [lsp-installer (util.load-plugin :nvim-lsp-installer)]
- (lsp-installer.on_server_ready (fn [server]
- (let [opts (get-server-opts server)]
- (server:setup opts)))))
+(let [lsp-installer (util.load-plugin :nvim-lsp-installer)
+ lspconfig (util.load-plugin :lspconfig)]
+ (lsp-installer.setup)
+ (each [_ server (ipairs (lsp-installer.get_installed_servers))]
+ (let [server-config (. lspconfig server.name)]
+ (server-config.setup (get-server-opts server)))))