Function: dape--mode-line-format

dape--mode-line-format is a natively compiled function defined in dape.el.

Signature

(dape--mode-line-format)

Documentation

Update variable dape--mode-line-format(var)/dape--mode-line-format(fun) format.

Source Code

;; Defined in /nix/store/1fiaif8pifqj2jh65rbg3fkhg3i56q42-emacs-packages-deps/share/emacs/site-lisp/elpa/dape-0.27.1/dape.el
(defun dape--mode-line-format ()
  "Update variable `dape--mode-line-format' format."
  (let ((conn (or (dape--live-connection 'last t)
                  (car dape--connections))))
    (setq dape--mode-line-format
          `(( :propertize "dape"
              face font-lock-constant-face
              mouse-face mode-line-highlight
              help-echo "Dape: Debug Adapter Protocol for Emacs\n\
mouse-1: Display minor mode menu"
              keymap ,(let ((map (make-sparse-keymap)))
                        (define-key map [mode-line down-mouse-1] dape-menu)
                        map))
            ":"
            ( :propertize
              ,(when-let* ((thread-name (plist-get (dape--current-thread conn) :name)))
                 (concat thread-name " "))
              face font-lock-constant-face
              mouse-face mode-line-highlight
              help-echo "mouse-1: Select thread"
              keymap ,(let ((map (make-sparse-keymap)))
                        (define-key map [mode-line down-mouse-1] #'dape-select-thread)
                        map))
            ( :propertize ,(format "%s" (or (and conn (dape--state conn))
                                            'unknown))
              face font-lock-doc-face)
            ,@(when-let* (conn
                          (reason (dape--state-reason conn)))
                `("/" (:propertize ,reason face font-lock-doc-face)))
            ,@(when-let* (conn
                          (children
                           (cl-loop with root = (dape--root-of conn)
                                    for conn in (dape--live-connections)
                                    count (and (eq (dape--root-of conn) root)
                                               (dape--threads conn))))
                          ((> children 1)))
                `(( :propertize ,(format "(%d)" children)
                    face shadow
                    help-echo "Active child connections")))))))