1
0
Fork 0

nvim: Only start certain LS if the binary exists

This commit is contained in:
Daniel Kempkens 2023-07-15 01:07:28 +02:00
parent 33f9deda29
commit e16bf25a91
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM

View file

@ -45,12 +45,15 @@
(each [_ name (pairs default-servers)] (each [_ name (pairs default-servers)]
((. lsp name :setup) default-config)) ((. lsp name :setup) default-config))
;; Custom ;; Custom
(lsp.elixirls.setup (->> {:cmd [:elixir-ls]} (when (= (vim.fn.executable :elixir-ls) 1)
(vim.tbl_extend :force default-config))) (lsp.elixirls.setup (->> {:cmd [:elixir-ls]}
(lsp.nil_ls.setup (->> {:settings {:nil {:formatting {:command [:nixpkgs-fmt]}}}} (vim.tbl_extend :force default-config))))
(vim.tbl_extend :force default-config))) (when (= (vim.fn.executable :nil) 1)
;; (lsp.nixd.setup (->> {:settings {:formatting {:command [:nixpkgs-fmt]}}} (lsp.nil_ls.setup (->> {:settings {:nil {:formatting {:command [:nixpkgs-fmt]}}}}
;; (vim.tbl_extend :force default-config))) (vim.tbl_extend :force default-config))))
(when (= (vim.fn.executable :nixd) 1)
(lsp.nixd.setup (->> {:settings {:formatting {:command [:nixpkgs-fmt]}}}
(vim.tbl_extend :force default-config))))
(let [inlay-hints {:includeInlayParameterNameHints :all (let [inlay-hints {:includeInlayParameterNameHints :all
:includeInlayParameterNameHintsWhenArgumentMatchesName false :includeInlayParameterNameHintsWhenArgumentMatchesName false
:includeInlayFunctionParameterTypeHints true :includeInlayFunctionParameterTypeHints true