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
|
||||||
(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
|
||||||
|
|
Loading…
Reference in a new issue