diff --git a/modules/completion/vertico/doctor.el b/modules/completion/vertico/doctor.el index 06806a39e..febc9702d 100644 --- a/modules/completion/vertico/doctor.el +++ b/modules/completion/vertico/doctor.el @@ -1,11 +1,12 @@ ;;; completion/vertico/doctor.el -*- lexical-binding: t; -*- -(require 'consult) +(when (require 'consult nil t) + ;; FIXME: This throws an error if grep is missing. + (unless (consult--grep-lookahead-p "grep" "-P") + (warn! "The installed grep binary was not built with support for PCRE lookaheads") + (explain! "Some advanced consult filtering features will not work as a result, see the module readme.")) -(unless (consult--grep-lookahead-p "grep" "-P") - (warn! "The installed grep binary was not built with support for PCRE lookaheads. - Some advanced consult filtering features will not work as a result, see the module readme.")) - -(unless (consult--grep-lookahead-p "rg" "-P") - (warn! "The installed ripgrep binary was not built with support for PCRE lookaheads. - Some advanced consult filtering features will not work as a result, see the module readme.")) + ;; TODO: Move this to core in v3.0 + (unless (consult--grep-lookahead-p "rg" "-P") + (warn! "The installed ripgrep binary was not built with support for PCRE lookaheads.") + (explain! "Some advanced consult filtering features will not work as a result, see the module readme.")))