Refactor lang/rust lsp check

This commit is contained in:
Henrik Lissner 2020-02-29 19:09:50 -05:00
parent cb38bb23df
commit 698001900f
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -12,10 +12,8 @@
(warn! "Couldn't find cargo binary")) (warn! "Couldn't find cargo binary"))
(if (featurep! +lsp) (if (featurep! +lsp)
(let ((lsp-server 'rls))
(when (require 'rustic nil t) (when (require 'rustic nil t)
(setq lsp-server rustic-lsp-server)) (pcase rustic-lsp-server
(pcase lsp-server
(`rust-analyzer (`rust-analyzer
(unless (executable-find "rust-analyzer") (unless (executable-find "rust-analyzer")
(warn! "Couldn't find rust analyzer (rust-analyzer)"))) (warn! "Couldn't find rust analyzer (rust-analyzer)")))