nvim: Only start certain LS if the binary exists
This commit is contained in:
parent
33f9deda29
commit
e16bf25a91
1 changed files with 9 additions and 6 deletions
|
@ -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
|
||||||
|
(when (= (vim.fn.executable :elixir-ls) 1)
|
||||||
(lsp.elixirls.setup (->> {:cmd [:elixir-ls]}
|
(lsp.elixirls.setup (->> {:cmd [:elixir-ls]}
|
||||||
(vim.tbl_extend :force default-config)))
|
(vim.tbl_extend :force default-config))))
|
||||||
|
(when (= (vim.fn.executable :nil) 1)
|
||||||
(lsp.nil_ls.setup (->> {:settings {:nil {: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))))
|
||||||
;; (lsp.nixd.setup (->> {:settings {:formatting {:command [:nixpkgs-fmt]}}}
|
(when (= (vim.fn.executable :nixd) 1)
|
||||||
;; (vim.tbl_extend :force default-config)))
|
(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
|
||||||
|
|
Loading…
Reference in a new issue