[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/telephone-line c9aca6ce03 143/195: Add flycheck segment
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/telephone-line c9aca6ce03 143/195: Add flycheck segment |
Date: |
Wed, 5 Jan 2022 02:59:40 -0500 (EST) |
branch: elpa/telephone-line
commit c9aca6ce030fac893793558c74a957e7bd0e6034
Author: Daniel Bordak <dbordak@fastmail.fm>
Commit: Daniel Bordak <dbordak@fastmail.fm>
Add flycheck segment
---
telephone-line-segments.el | 31 +++++++++++++++++++++++++++++++
telephone-line.el | 3 ++-
2 files changed, 33 insertions(+), 1 deletion(-)
diff --git a/telephone-line-segments.el b/telephone-line-segments.el
index 2ccef11c6f..da4c072c69 100644
--- a/telephone-line-segments.el
+++ b/telephone-line-segments.el
@@ -129,6 +129,37 @@ mouse-3: Toggle minor modes"
(seq-take tag 2)
tag))))
+(telephone-line-defsegment telephone-line-flycheck-segment ()
+ (when (bound-and-true-p flycheck-mode)
+ (let* ((text (pcase flycheck-last-status-change
+ ('finished (if flycheck-current-errors
+ (let-alist (flycheck-count-errors
flycheck-current-errors)
+ (if (or .error .warning)
+ (propertize (format "Problems: %s/%s"
+ (or .error 0) (or
.warning 0))
+ 'face '(:foreground
"orange"))
+ ""))
+ ":)"))
+ ('running "*")
+ ('no-checker "-")
+ ('not-checked "=")
+ ('errored (propertize "!" 'face '(:foreground
"tomato")))
+ ('interrupted (propertize "." 'face '(:foreground
"tomato")))
+ ('suspicious "?"))))
+ (propertize text
+ 'help-echo (pcase flycheck-last-status-change
+ ('finished "Display errors found by Flycheck")
+ ('running "Running...")
+ ('no-checker "No Checker")
+ ('not-checked "Not Checked")
+ ('errored "Error!")
+ ('interrupted "Interrupted")
+ ('suspicious "Suspicious?"))
+ 'display '(raise 0.0)
+ 'mouse-face '(:box 1)
+ 'local-map (make-mode-line-mouse-map
+ 'mouse-1 #'flycheck-list-errors)))))
+
(telephone-line-defsegment* telephone-line-xah-fly-keys-segment ()
(when (boundp xah-fly-insert-state-q)
(let ((tag (if xah-fly-insert-state-q
diff --git a/telephone-line.el b/telephone-line.el
index 063374779a..e4ef34d8aa 100644
--- a/telephone-line.el
+++ b/telephone-line.el
@@ -329,7 +329,8 @@ separators, as they are conditional, are evaluated
on-the-fly."
:group 'telephone-line)
(defcustom telephone-line-rhs
- '((nil . (telephone-line-misc-info-segment))
+ '((nil . (telephone-line-flycheck-segment
+ telephone-line-misc-info-segment))
(accent . (telephone-line-major-mode-segment))
(evil . (telephone-line-airline-position-segment)))
"Right hand side segment alist."
- [nongnu] elpa/telephone-line 4adfbf02bb 092/195: Shorten readme, (continued)
- [nongnu] elpa/telephone-line 4adfbf02bb 092/195: Shorten readme, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line aa746faab1 149/195: Add doomy filename segment, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 743614f372 128/195: Force nil's width to 0; fixes clipping issue., ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 1cc28a7811 146/195: Forgot the else clause, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line dd1afefa00 152/195: Add telephone-line-error and warning faces., ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line dde8805867 142/195: Remove brackets from projectile segment, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line b3eaf4b825 134/195: Use center-lhs and center-rhs instead of keyword, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line f7014a0cc5 004/195: Add Readme, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 324da1bbb6 111/195: Add ryo-modal support, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 64a1f079f5 090/195: Update copyrights, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line c9aca6ce03 143/195: Add flycheck segment,
ELPA Syncer <=
- [nongnu] elpa/telephone-line 6e1ecf51a2 147/195: Add doom/atom encoding segments, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line cbaf1b8134 138/195: Switch guards to boundp checks rather than eval-after-load, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line e8e2078b43 131/195: Less bad name for unicode separators, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 212b3df07a 166/195: Merge pull request #92 from sebasmonia/master, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 6521585c94 180/195: Merge pull request #112 from fishyfriend/evil-god, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 06cbfc8d49 179/195: Add face for evil-god-state, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line deda33317b 187/195: Fix formatting, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line c5e08d268d 007/195: Move screenshots into subdir, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 0762bae37a 079/195: Corrected indentation, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 96030b4c98 026/195: Further clean up start of readme, ELPA Syncer, 2022/01/05