Skip to content

Commit f809e62

Browse files
committed
feat: Add custom faces
1 parent f0289c8 commit f809e62

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

sideline-flycheck.el

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,21 @@
7676
(defvar-local sideline-flycheck--errors (ht-create)
7777
"Store error messages as key.")
7878

79+
(defface sideline-flycheck-error
80+
`((t :inherit error))
81+
"Indicate error operation."
82+
:group 'sideline-flycheck)
83+
84+
(defface sideline-flycheck-warning
85+
`((t :inherit warning))
86+
"Indicate warning operation."
87+
:group 'sideline-flycheck)
88+
89+
(defface sideline-flycheck-success
90+
`((t :inherit success))
91+
"Indicate successful operation."
92+
:group 'sideline-flycheck)
93+
7994
;;;###autoload
8095
(defun sideline-flycheck (command)
8196
"Backend for sideline.
@@ -106,9 +121,9 @@ Argument COMMAND is required in sideline backend."
106121
(dolist (err errors)
107122
(let* ((level (sideline-2str (flycheck-error-level err)))
108123
(face (cond
109-
((string-match-p "warning" level) 'warning)
110-
((string-match-p "error" level) 'error)
111-
(t 'success)))
124+
((string-match-p "warning" level) 'sideline-flycheck-warning)
125+
((string-match-p "error" level) 'sideline-flycheck-error)
126+
(t 'sideline-flycheck-success)))
112127
(msg (flycheck-error-message err))
113128
(lines (split-string msg "\n"))
114129
(lines (butlast lines (- (length lines) sideline-flycheck-max-lines)))

0 commit comments

Comments
 (0)