diff options
| author | aktersnurra <grydholm@kth.se> | 2022-04-23 21:22:24 +0200 |
|---|---|---|
| committer | aktersnurra <grydholm@kth.se> | 2022-04-23 21:22:24 +0200 |
| commit | 4932d32cae9a2a63226b67e6678d459b773f1f8b (patch) | |
| tree | 5b7d3fb35afe2e9f067f73ff70742e87c84d7342 /fnl/config/lsp/lsp-installer.fnl | |
| parent | d3f68e913454fb9cfa555ab112a23c3d86e6bec4 (diff) | |
fix(lsp): error loading capabilities and format
Diffstat (limited to 'fnl/config/lsp/lsp-installer.fnl')
| -rw-r--r-- | fnl/config/lsp/lsp-installer.fnl | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/fnl/config/lsp/lsp-installer.fnl b/fnl/config/lsp/lsp-installer.fnl index 358ba1c..4e46cfd 100644 --- a/fnl/config/lsp/lsp-installer.fnl +++ b/fnl/config/lsp/lsp-installer.fnl @@ -1,28 +1,29 @@ ;; LSP installer. (module config.lsp.lsp-installer {autoload {util util}}) -(defn- handler-opts [] (let [handlers (require :config.lsp.handlers)] - {:on_attach handlers.on-attach - :capabilities handlers.capabilities})) +(def handler-opts + (let [handlers (require :config.lsp.handlers)] + {:on_attach handlers.on-attach + :capabilities (handlers.capabilities)})) (defn- jsonls-opts [] (let [jsonls-opts (require :config.lsp.settings.jsonls)] - (vim.tbl_deep_extend :force jsonls-opts (handler-opts)))) + (vim.tbl_deep_extend :force jsonls-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)))) + (vim.tbl_deep_extend :force sumneko-lua.opts handler-opts))) (defn- pyright-opts [] (let [pyright (require :config.lsp.settings.pyright)] - (vim.tbl_deep_extend :force pyright.opts (handler-opts)))) + (vim.tbl_deep_extend :force pyright.opts handler-opts))) (defn- get-server-opts [server] (match server.name "jsonls" (jsonls-opts) "pyright" (pyright-opts) "sumneko_lua" (sumneko-lua-opts) - _ (handler-opts))) + _ handler-opts)) (let [lsp-installer (util.load-plugin :nvim-lsp-installer)] (lsp-installer.on_server_ready (fn [server] |