emacs-sideline / sideline-flycheck

Show flycheck errors with sideline
GNU General Public License v3.0
17 stars 4 forks source link

Customize faces used by sideline-flycheck #7

Open DivineDominion opened 4 months ago

DivineDominion commented 4 months ago

I was investigating why neither my sideline-backend nor sideline-default font settings were honored and found:

https://github.com/emacs-sideline/sideline-flycheck/blob/ed4d7ef10c173ffd0a40677621547362269c3311/sideline-flycheck.el#L95-L96

I'm not certain, yet, but wonder if the sideline display of flycheck-* faces warrants a replacement. I use smaller and variable width sideline fonts to put more info there, for example.

My thinking is to map all flycheck-* fonts to sideline-flycheck-* faces that by default merely inherit from their flycheck counterparts.

E.g. this:

(defgroup sideline-flycheck-faces nil
  "Faces used to display on-the-fly syntax checking in the sideline."
  :prefix "sideline-flycheck-"
  :group 'sideline-flycheck)

(defface sideline-flycheck-error-list-error
  '((t :inherit flycheck-error-list-error))
  "Sideline Flycheck face for error messages in the error list."
  :package-version '(sideline-flycheck . "0.1")
  :group 'sideline-flycheck-faces)

What do you think about that?

Exported list of error faces

flycheck-error                           Flycheck face for errors.                                                       
flycheck-error-list-id                   Face for the error ID in the error list.                                        
flycheck-error-delimiter                 Flycheck face for errors spanning multiple lines.                               
flycheck-error-list-info                 Flycheck face for info messages in the error list.                              
flycheck-error-list-error                Flycheck face for error messages in the error list.                             
flycheck-error-list-warning              Flycheck face for warning messages in the error list.                           
flycheck-error-list-filename             Face for filenames in the error list.                                           
flycheck-error-list-highlight            Flycheck face to highlight errors in the error list.                            
flycheck-error-list-line-number          Face for line numbers in the error list.                                        
flycheck-error-list-checker-name         Face for the syntax checker name in the error list.                             
flycheck-error-list-column-number        Face for line numbers in the error list.                                        
flycheck-error-list-error-message        Face for the error message in the error list.                                   
flycheck-error-list-id-with-explainer    Face for the error ID in the error list, for errors that have an explainer.     
jcs090218 commented 3 months ago

I would like to add it. It's often a good idea since flycheck and sideline-flycheck display errors differently.

Feel free to open PRs for this. :)