Refactor doom doctor
And move font check into core/doctor.el
This commit is contained in:
parent
fd1b31667e
commit
798e10c4f2
2 changed files with 29 additions and 32 deletions
|
@ -33,5 +33,27 @@
|
|||
(file-directory-p "~/.doom.d"))
|
||||
(warn! "Both %S and '~/.doom.d' exist on your system"
|
||||
(abbreviate-file-name doom-private-dir))
|
||||
(explain! "Doom will only load one of these (~/.config/doom takes precedence). Since\n"
|
||||
"it is rarely intentional that you have both, ~/.doom.d should be removed."))
|
||||
(explain! "Doom will only load one of these (~/.config/doom takes precedence). Possessing\n"
|
||||
"both is rarely intentional; you should one or the other."))
|
||||
|
||||
;; Check for fonts
|
||||
(if (not (fboundp 'find-font))
|
||||
(progn
|
||||
(warn! "Warning: unable to detect font")
|
||||
(explain! "The `find-font' function is missing. This could indicate the incorrect "
|
||||
"version of Emacs is being used!"))
|
||||
;; all-the-icons fonts
|
||||
(let ((font-dest (pcase system-type
|
||||
(`gnu/linux (concat (or (getenv "XDG_DATA_HOME")
|
||||
"~/.local/share")
|
||||
"/fonts/"))
|
||||
(`darwin "~/Library/Fonts/"))))
|
||||
(when (and font-dest (require 'all-the-icons nil t))
|
||||
(dolist (font all-the-icons-font-families)
|
||||
(if (sh "fc-list | grep %s" font)
|
||||
(success! "Found font %s" font)
|
||||
(warn! "Warning: couldn't find %s font in %s"
|
||||
font font-dest)
|
||||
(explain! "You can install it by running `M-x all-the-icons-install-fonts' within Emacs.\n\n"
|
||||
"This could also mean you've installed them in non-standard locations, in which "
|
||||
"case feel free to ignore this warning."))))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue