diff options
Diffstat (limited to 'emacs.d/core')
-rw-r--r-- | emacs.d/core/core-flycheck.el | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/emacs.d/core/core-flycheck.el b/emacs.d/core/core-flycheck.el index 7118f83..ab33887 100644 --- a/emacs.d/core/core-flycheck.el +++ b/emacs.d/core/core-flycheck.el @@ -12,6 +12,25 @@ (setq-default flycheck-disabled-checkers '(emacs-lisp-checkdoc))) :config (progn + (setq flycheck-mode-line + '(:eval + (pcase flycheck-last-status-change + (`not-checked nil) + (`no-checker (propertize " -" 'face 'warning)) + (`running "") + (`errored (propertize " ✘" 'face 'error)) + (`finished + (if flycheck-current-errors + (let* ((error-counts (flycheck-count-errors flycheck-current-errors)) + (no-errors (cdr (assq 'error error-counts))) + (no-warnings (cdr (assq 'warning error-counts))) + (flycheck-face (cond (no-errors 'error) + (no-warnings 'warning)))) + (propertize (format " [✗:%s/%s]" (or no-errors 0) (or no-warnings 0)) 'face flycheck-face)) + (propertize " [✓]" 'face 'success))) + (`interrupted " -") + (`suspicious '(propertize " ?" 'face 'warning))))) + (flycheck-define-checker source-check "A syntax checker for python source code in Source, using `check.pex'" :command ("check.pex" source) |