Function: doom-modeline-segment--check

doom-modeline-segment--check is a natively compiled function defined in doom-modeline-segments.el.

Signature

(doom-modeline-segment--check)

Documentation

Displays color-coded error status in the current buffer with pretty icons.

Source Code

;; Defined in /nix/store/1lcicrdd2r4b8rkc91nnn74ymk1jl6yd-emacs-packages-deps/share/emacs/site-lisp/elpa/doom-modeline-20260928.1632/doom-modeline-segments.el
(doom-modeline-def-segment check
  "Displays color-coded error status in the current buffer with pretty icons."
  (when-let* ((sep (doom-modeline-spc))
              (vsep (doom-modeline-vspc))
              (seg (cond
                    ((bound-and-true-p flymake-mode)
                     doom-modeline--flymake)
                    ((bound-and-true-p flycheck-mode)
                     doom-modeline--flycheck))))
    (concat
     sep
     (let ((str))
       (dolist (s (split-string seg " "))
         (setq str
               (concat str
                       (if (string-match-p "^[0-9]+$" s)
                           (concat vsep
                                   (doom-modeline-display-text s)
                                   vsep)
                         (doom-modeline-display-icon s)))))
       (propertize str
                   'help-echo (get-text-property 0 'help-echo seg)
                   'mouse-face 'doom-modeline-highlight
                   'local-map (get-text-property 0 'local-map seg)))
     sep)))