Rewrite doctor; move warn! blocks out in doctor.el files

This commit is contained in:
Henrik Lissner 2018-03-12 13:16:16 -04:00
parent 5c36519dab
commit 74c8b1d113
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
16 changed files with 193 additions and 147 deletions

View file

@ -19,11 +19,6 @@
(def-package! racer
:after rust-mode
:config
(unless (file-exists-p racer-cmd)
(warn! "Couldn't find racer binary. Code completion won't work"))
(unless (file-directory-p racer-rust-src-path)
(warn! "Couldn't find rust source. Code completion won't work"))
(add-hook! 'rust-mode-hook #'(eldoc-mode racer-mode))
(set! :lookup 'rust-mode
:definition #'racer-find-definition

View file

@ -0,0 +1,9 @@
;;; lang/rust/doctor.el -*- lexical-binding: t; -*-
(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'.")))