2018-03-20 21:19:37 -04:00
|
|
|
;; -*- lexical-binding: t; no-byte-compile: t; -*-
|
|
|
|
;;; lang/rust/doctor.el
|
2018-03-12 13:16:16 -04:00
|
|
|
|
2019-04-22 03:10:25 -04:00
|
|
|
(assert! (or (not (featurep! +lsp))
|
|
|
|
(featurep! :tools lsp))
|
|
|
|
"This module requires (:tools lsp)")
|
|
|
|
|
|
|
|
(unless (executable-find "rust")
|
|
|
|
(warn! "Couldn't find rust binary"))
|
|
|
|
|
|
|
|
(unless (executable-find "cargo")
|
|
|
|
(warn! "Couldn't find cargo binary"))
|
|
|
|
|
2018-03-12 13:16:16 -04:00
|
|
|
(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'.")))
|