summary refs log tree commit diff
path: root/emacs.d
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--emacs.d/init.el29
1 files changed, 16 insertions, 13 deletions
diff --git a/emacs.d/init.el b/emacs.d/init.el
index 16f250d..5051c13 100644
--- a/emacs.d/init.el
+++ b/emacs.d/init.el
@@ -192,20 +192,23 @@
       :modes (python-mode))
     (add-to-list 'flycheck-checkers 'source-check)
 
+    (defun fc/flycheck-modeline (errors-count warnings-count info-count)
+      (concat
+       (format "•%s " errors-count)
+       (format "•%s " warnings-count)
+       (format "•%s " info-count)))
+
     (setq flycheck-mode-line
-        '(:eval
-          (pcase flycheck-last-status-change
-            (`running     " ⟲ Running")
-            (`errored     " ⚠ Error")
-            (`no-checker  " ⚠ No Checker")
-            (`suspicious  " ⚠ Suspicious")
-            (`not-checked " ✖ Disabled")
-            (`interrupted " ⚠ Interrupted")
-            (`finished
-             (let* ((error-counts (flycheck-count-errors flycheck-current-errors))
-                    (no-errors (cdr (assq 'error error-counts)))
-                    (no-warnings (cdr (assq 'warning error-counts))))
-               (if (or no-errors no-warnings) (format " ✘ %s/%s Issues" (or no-errors 0) (or no-warnings 0)) " ✔ No Issues"))))))))
+          '(:eval
+            (pcase flycheck-last-status-change
+              (`finished
+               (let* ((count (flycheck-count-errors flycheck-current-errors))
+                      (errors-count (cdr (assq 'error count)))
+                      (warnings-count (cdr (assq 'warning count)))
+                      (info-count (cdr (assq 'info count))))
+                 (fc/flycheck-modeline (or errors-count 0) (or warnings-count 0) (or info-count 0))))
+              ;; the default is to show ? for the count
+              (_ (fc/flycheck-modeline "?" "?" "?")))))))
 
 (use-package flyspell
   ;; check the spelling