doom-emacs/modules/lang/ruby/doctor.el
Henrik Lissner ad6a3d0f33
refactor: deprecate featurep! for modulep!
featurep! will be renamed modulep! in the future, so it's been
deprecated. They have identical interfaces, and can be replaced without
issue.

featurep! was never quite the right name for this macro. It implied that
it had some connection to featurep, which it doesn't (only that it was
similar in purpose; still, Doom modules are not features). To undo such
implications and be consistent with its namespace (and since we're
heading into a storm of breaking changes with the v3 release anyway),
now was the best opportunity to begin the transition.
2022-08-14 20:43:35 +02:00

20 lines
831 B
EmacsLisp

;;; lang/ruby/doctor.el -*- lexical-binding: t; -*-
(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)")
(unless (executable-find "ruby")
(warn! "Ruby isn't installed."))
(when (and (executable-find "rbenv") (modulep! +rbenv))
(unless (split-string (shell-command-to-string "rbenv versions --bare") "\n" t)
(warn! "No versions of ruby are available via rbenv, did you forget to install one?")))
(when (and (executable-find "chruby") (modulep! +chruby))
(unless (split-string (shell-command-to-string "chruby") "\n" t)
(warn! "No versions of ruby are available via chruby, did you forget to install one?")))