mirror of
https://github.com/correl/doom-modeline.git
synced 2024-12-17 19:16:11 +00:00
Refactor.
This commit is contained in:
parent
c5226e4aae
commit
64631d103a
1 changed files with 19 additions and 19 deletions
|
@ -685,26 +685,26 @@ Uses `all-the-icons-material' to fetch the icon."
|
||||||
(`interrupted (doom-modeline-checker-icon "pause" "." 'doom-modeline-debug))
|
(`interrupted (doom-modeline-checker-icon "pause" "." 'doom-modeline-debug))
|
||||||
(`suspicious (doom-modeline-checker-icon "priority_high" "?" 'doom-modeline-urgent))
|
(`suspicious (doom-modeline-checker-icon "priority_high" "?" 'doom-modeline-urgent))
|
||||||
(_ nil))))
|
(_ nil))))
|
||||||
(when icon
|
(propertize
|
||||||
(propertize icon
|
icon
|
||||||
'help-echo (concat "Flycheck\n"
|
'help-echo (concat "Flycheck\n"
|
||||||
(pcase status
|
(pcase status
|
||||||
('finished "mouse-1: Display minor mode menu
|
('finished "mouse-1: Display minor mode menu
|
||||||
mouse-2: Show help for minor mode")
|
mouse-2: Show help for minor mode")
|
||||||
('running "Running...")
|
('running "Running...")
|
||||||
('no-checker "No Checker")
|
('no-checker "No Checker")
|
||||||
('errored "Error")
|
('errored "Error")
|
||||||
('interrupted "Interrupted")
|
('interrupted "Interrupted")
|
||||||
('suspicious "Suspicious")))
|
('suspicious "Suspicious")))
|
||||||
'mouse-face '(:box 0)
|
'mouse-face '(:box 0)
|
||||||
'local-map (let ((map (make-sparse-keymap)))
|
'local-map (let ((map (make-sparse-keymap)))
|
||||||
(define-key map [mode-line down-mouse-1]
|
(define-key map [mode-line down-mouse-1]
|
||||||
flycheck-mode-menu-map)
|
flycheck-mode-menu-map)
|
||||||
(define-key map [mode-line mouse-2]
|
(define-key map [mode-line mouse-2]
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(describe-function 'flycheck-mode)))
|
(describe-function 'flycheck-mode)))
|
||||||
map))))))
|
map)))))
|
||||||
(add-hook 'flycheck-status-changed-functions #'doom-modeline-update-flycheck-icon)
|
(add-hook 'flycheck-status-changed-functions #'doom-modeline-update-flycheck-icon)
|
||||||
(add-hook 'flycheck-mode-hook #'doom-modeline-update-flycheck-icon)
|
(add-hook 'flycheck-mode-hook #'doom-modeline-update-flycheck-icon)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue