doomemacs/modules/lang/rust/doctor.el

34 lines
1.1 KiB
EmacsLisp
Raw Normal View History

2018-03-20 21:19:37 -04:00
;; -*- lexical-binding: t; no-byte-compile: t; -*-
;;; lang/rust/doctor.el
(assert! (or (not (modulep! +lsp))
(modulep! :tools lsp))
"This module requires (:tools lsp)")
(assert! (or (not (modulep! +tree-sitter))
(modulep! :tools tree-sitter))
"This module requires (:tools tree-sitter)")
2019-04-25 18:31:42 +02:00
(unless (executable-find "rustc")
(warn! "Couldn't find rustc binary"))
(unless (executable-find "cargo")
(warn! "Couldn't find cargo binary"))
(if (modulep! +lsp)
2020-02-29 19:09:50 -05:00
(when (require 'rustic nil t)
(pcase rustic-lsp-server
(`rust-analyzer
(unless (executable-find "rust-analyzer")
(warn! "Couldn't find rust analyzer (rust-analyzer)")))
(`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'"))))