summaryrefslogtreecommitdiff
path: root/fnl/config
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2022-06-01 00:19:38 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2022-06-01 00:19:38 +0200
commit68ddcd0a4d858750bd1138501afb7e4d1a8f9922 (patch)
treee43845ea580aa67c57fa37cf5100c1e39f03d54c /fnl/config
parent02a7d8c0950335fc7187433ecfa5b8b313bb3c8d (diff)
Fix bug in merge with duplicate ls
Diffstat (limited to 'fnl/config')
-rw-r--r--fnl/config/lsp/lsp-installer.fnl32
1 files changed, 16 insertions, 16 deletions
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))))))