From 68ddcd0a4d858750bd1138501afb7e4d1a8f9922 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Wed, 1 Jun 2022 00:19:38 +0200 Subject: Fix bug in merge with duplicate ls --- fnl/config/lsp/lsp-installer.fnl | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'fnl') diff --git a/fnl/config/lsp/lsp-installer.fnl b/fnl/config/lsp/lsp-installer.fnl index df99ac2..9cc793b 100644 --- a/fnl/config/lsp/lsp-installer.fnl +++ b/fnl/config/lsp/lsp-installer.fnl @@ -1,26 +1,26 @@ ;; Loads default handlers and specific language settings. (module config.lsp.lsp-installer {autoload {util util}}) -(def- default-servers [:bashls - :clangd - :cssls - :dockerls - :html - :hls - :jsonls - :pyright - :rust_analyzer - :terraformls - :texlab - :tflint - :yamlls - :zk]) +(def- default-servers {:bashls true + :clangd true + :cssls true + :dockerls true + :html true + :hls true + :jsonls true + :pyright true + :rust_analyzer true + :terraformls true + :texlab true + :tflint true + :yamlls true + :zk true}) (defn- merge [default-servers installed-servers] (let [servers default-servers] (each [_ server (ipairs installed-servers)] (if (not= (. servers server.name) true) - (tset servers (+ (length servers) 1) server.name))) + (tset servers server.name true))) servers)) (def- handler-opts @@ -50,6 +50,6 @@ lspconfig (util.load-plugin :lspconfig)] (let [servers (merge default-servers (lsp-installer.get_installed_servers))] (lsp-installer.setup {:ensure_installed servers}) - (each [_ server (ipairs servers)] + (each [server _ (pairs servers)] (let [server-config (. lspconfig server)] (server-config.setup (get-server-opts server)))))) -- cgit v1.2.3-70-g09d2