diff --git a/doom-modeline-segments.el b/doom-modeline-segments.el index 6666676..51f3476 100644 --- a/doom-modeline-segments.el +++ b/doom-modeline-segments.el @@ -91,6 +91,10 @@ (declare-function aw-update 'ace-window) (declare-function aw-window-list 'ace-window) (declare-function battery-format 'battery) +(declare-function dap--cur-session 'dap-mode) +(declare-function dap-debug-recent 'dap-mode) +(declare-function dap-hydra 'dap-hydra) +(declare-function dap-mode-line 'dap-mode) (declare-function edebug-help 'edebug) (declare-function edebug-next-mode 'edebug) (declare-function edebug-stop 'edebug) @@ -1756,6 +1760,24 @@ mouse-3: Fetch notifications" (bound-and-true-p edebug-x-mode)) " ") + ;; For `dap-mode' + (when (and (bound-and-true-p dap-mode) + (bound-and-true-p lsp-mode) + (dap--cur-session)) + (propertize + (doom-modeline-debug-icon 'doom-modeline-urgent) + 'help-echo (format "DAP (%s) +mouse-1: Display debug hydra +mouse-2: Display recent configurations" + (dap-mode-line)) + 'mouse-face '(:box 0) + 'local-map (let ((map (make-sparse-keymap))) + (define-key map [mode-line mouse-1] + #'dap-hydra) + (define-key map [mode-line mouse-2] + #'dap-debug-recent) + map))) + ;; For `edebug' (when (or (bound-and-true-p edebug-mode) (bound-and-true-p edebug-x-mode)) diff --git a/doom-modeline.el b/doom-modeline.el index 7c54527..b7255be 100644 --- a/doom-modeline.el +++ b/doom-modeline.el @@ -4,7 +4,7 @@ ;; Author: Vincent Zhang ;; Homepage: https://github.com/seagle0128/doom-modeline -;; Version: 1.9.2 +;; Version: 1.9.3 ;; Package-Requires: ((emacs "25.1") (all-the-icons "1.0.0") (shrink-path "0.2.0") (eldoc-eval "0.1") (dash "2.11.0")) ;; Keywords: faces mode-line