summaryrefslogtreecommitdiff
path: root/fnl/config/lsp
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2022-06-07 22:02:45 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2022-06-07 22:02:45 +0200
commitc9669aae6e43bf0caf1d255eea5d4dc61a385e36 (patch)
tree44e944cebe2ca8ec36d6cb2c33baacbd846e6844 /fnl/config/lsp
parent66fd789c673cc659ec0c18d25438892d66dba28d (diff)
Update lsp installer
Diffstat (limited to 'fnl/config/lsp')
-rw-r--r--fnl/config/lsp/init.fnl2
-rw-r--r--fnl/config/lsp/lsp-installer.fnl32
2 files changed, 17 insertions, 17 deletions
diff --git a/fnl/config/lsp/init.fnl b/fnl/config/lsp/init.fnl
index 6e7473d..0506e4f 100644
--- a/fnl/config/lsp/init.fnl
+++ b/fnl/config/lsp/init.fnl
@@ -1,7 +1,7 @@
;; Loads the LSP functionality.
(module config.lsp.init {autoload {util util}})
+(require :config.lsp.lsp-installer)
(let [handlers (require :config.lsp.handlers)]
(handlers.setup))
-(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 c08f1d6..e3b153f 100644
--- a/fnl/config/lsp/lsp-installer.fnl
+++ b/fnl/config/lsp/lsp-installer.fnl
@@ -23,28 +23,28 @@
(tset servers server.name true)))
servers))
-(def- handler-opts
- (let [handlers (require :config.lsp.handlers)]
- {:on_attach handlers.on-attach :capabilities (handlers.capabilities)}))
+(defn- handler-opts []
+ (let [handlers (require :config.lsp.handlers)]
+ {:on_attach handlers.on-attach :capabilities (handlers.capabilities)}))
-(def- jsonls-opts
- (let [jsonls-opts (require :config.lsp.settings.jsonls)]
- (vim.tbl_deep_extend :force jsonls-opts handler-opts)))
+(defn- jsonls-opts []
+ (let [jsonls-opts (require :config.lsp.settings.jsonls)]
+ (vim.tbl_deep_extend :force jsonls-opts (handler-opts))))
-(def- sumneko-lua-opts
- (let [sumneko-lua (require :config.lsp.settings.sumneko-lua)]
- (vim.tbl_deep_extend :force sumneko-lua.opts handler-opts)))
+(defn- sumneko-lua-opts []
+ (let [sumneko-lua (require :config.lsp.settings.sumneko-lua)]
+ (vim.tbl_deep_extend :force sumneko-lua.opts (handler-opts))))
-(def- pyright-opts
- (let [pyright (require :config.lsp.settings.pyright)]
- (vim.tbl_deep_extend :force pyright.opts handler-opts)))
+(defn- pyright-opts []
+ (let [pyright (require :config.lsp.settings.pyright)]
+ (vim.tbl_deep_extend :force pyright.opts (handler-opts))))
(defn- get-server-opts [server]
(match server
- :jsonls jsonls-opts
- :pyright pyright-opts
- :sumneko_lua sumneko-lua-opts
- _ handler-opts))
+ :jsonls (jsonls-opts)
+ :pyright (pyright-opts)
+ :sumneko_lua (sumneko-lua-opts)
+ _ (handler-opts)))
(let [lsp-installer (util.load-plugin :nvim-lsp-installer)
lspconfig (util.load-plugin :lspconfig)]