summaryrefslogtreecommitdiff
path: root/fnl/config/lsp/lsp-installer.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/config/lsp/lsp-installer.fnl')
-rw-r--r--fnl/config/lsp/lsp-installer.fnl34
1 files changed, 15 insertions, 19 deletions
diff --git a/fnl/config/lsp/lsp-installer.fnl b/fnl/config/lsp/lsp-installer.fnl
index 3649566..9522ef1 100644
--- a/fnl/config/lsp/lsp-installer.fnl
+++ b/fnl/config/lsp/lsp-installer.fnl
@@ -1,26 +1,22 @@
;; LSP installer.
-(module config.lsp.lsp-installer
- {autoload {util util}})
+(module config.lsp.lsp-installer {autoload {util util}})
-(def- opts
- (let [handlers (require :config.lsp.handlers)]
- {:on_attach: handlers.on_attach
- :capabilities handlers.capabilities}))
+(def- opts (let [handlers (require :config.lsp.handlers)]
+ {"on_attach:" handlers.on_attach
+ :capabilities handlers.capabilities}))
(defn- get-server-opts [server]
- (when (= server.name :jsonls)
- (let [jsonls-opts (require :config.lsp.settings.jsonls)]
- (vim.tbl_deep_extend :force jsonls-opts opts)))
- (when (= server.name :sumneko_lua)
- (let [sumneko-lua-opts (require :config.lsp.settings.sumneko-lua)]
- (vim.tbl_deep_extend :force sumneko-lua-opts.settings opts)))
- (when (= server.name :pyright)
- (let [pyright-opts (require :config.lsp.settings.pyright)]
- (vim.tbl_deep_extend :force pyright-opts.settings opts)))
- opts)
-
+ (when (= server.name :jsonls)
+ (let [jsonls-opts (require :config.lsp.settings.jsonls)]
+ (vim.tbl_deep_extend :force jsonls-opts opts)))
+ (when (= server.name :sumneko_lua)
+ (let [sumneko-lua-opts (require :config.lsp.settings.sumneko-lua)]
+ (vim.tbl_deep_extend :force sumneko-lua-opts.settings opts)))
+ (when (= server.name :pyright)
+ (let [pyright-opts (require :config.lsp.settings.pyright)]
+ (vim.tbl_deep_extend :force pyright-opts.settings opts))) 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 [opts (get-server-opts server)]
+ (server:setup opts)))))