lang/rust: add doctor checks for lsp servers
This commit is contained in:
parent
2f86c01170
commit
7b04bee2de
1 changed files with 18 additions and 7 deletions
|
@ -11,10 +11,21 @@
|
||||||
(unless (executable-find "cargo")
|
(unless (executable-find "cargo")
|
||||||
(warn! "Couldn't find cargo binary"))
|
(warn! "Couldn't find cargo binary"))
|
||||||
|
|
||||||
(when (require 'racer nil t)
|
(if (featurep! +lsp)
|
||||||
;; racer
|
(let ((lsp-server 'rls))
|
||||||
(unless (file-exists-p racer-cmd)
|
(when (require 'rustic nil t)
|
||||||
(warn! "Couldn't find the racer binary at `racer-cmd'"))
|
(setq lsp-server rustic-lsp-server))
|
||||||
;; rust source code (rustup component add rust-src)
|
(pcase lsp-server
|
||||||
(unless (file-directory-p racer-rust-src-path)
|
(`rust-analyzer
|
||||||
(warn! "Couldn't find Rust's source code at RUST_SRC_PATH or `racer-rust-src-path'.")))
|
(unless (executable-find "ra_lsp_server")
|
||||||
|
(warn! "Couldn't find rust analyzer (ra_lsp_server)")))
|
||||||
|
(`rls
|
||||||
|
(unless (executable-find "rls")
|
||||||
|
(warn! "Couldn't find rls")))))
|
||||||
|
(when (require 'racer nil t)
|
||||||
|
;; racer
|
||||||
|
(unless (file-exists-p racer-cmd)
|
||||||
|
(warn! "Couldn't find the racer binary at `racer-cmd'"))
|
||||||
|
;; rust source code (rustup component add rust-src)
|
||||||
|
(unless (file-directory-p racer-rust-src-path)
|
||||||
|
(warn! "Couldn't find Rust's source code at RUST_SRC_PATH or `racer-rust-src-path'."))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue