flycheck / flycheck-color-mode-line

An Emacs minor-mode for Flycheck which colors the mode-line according to the Flycheck state of the current buffer.
59 stars 5 forks source link

Optionally allow setting a face for when flycheck is running #4

Closed glasser closed 6 years ago

purcell commented 6 years ago

Thanks! I can see this being useful, and I'd be happy to merge this, but the new face definition with an arbitrary background colour isn't ideal: it will not look acceptable by default in many themes. Better to :inherit a standard face, e.g. font-lock-comment-face.

glasser commented 6 years ago

Heh, makes sense — I figured having it off by default meant it didn't matter what I chose (and I'm colorblind enough that I need the really obvious background color to make this mode useful) but that seems reasonable. Updated PR with inheriting font-lock-comment-face.

I am kinda confused about the definitions you have like


(defface flycheck-color-mode-line-warning-face
  '((t :foreground "#efefef" :weight normal :inherit flycheck-fringe-warning))
  "Face for the modeline in buffers with only Flycheck warnings."
  :group 'flycheck-faces)

From my reading, flycheck-fringe-warning inherits warning, and the only things that warning sets by default are foreground and weight. So it seems like in the defaults etup, everything from flycheck-fringe-warning is overridden anyway?

purcell commented 6 years ago

Hmm, could be... I'll take a look at that! In any case, this is now merged - thanks!

purcell commented 6 years ago

I've played with this a little bit, and I've made a few changes in 19947b81ddce6df4f10d3facb7c047538036a9df:

Let me know if you find any issues!

glasser commented 6 years ago

Heh, I just wasn't sure if your average user would want it changing all the time as it re-runs. I'm certainly planning to turn it on :)

purcell commented 6 years ago

Let's see if anyone complains. There's a way to customise it at least. If people don't like it, we'd change the default remap spec for "running" to be empty, then you and I can still customise the face as desired.

soupi commented 6 years ago

Let's see if anyone complains.

complaint here. this is annoying and distracting. can we have a flag to turn this off and had the old behaviour back?

thanks!

cpitclaudel commented 6 years ago

@soupi did you try customizing flycheck-color-mode-line-running-face?

purcell commented 6 years ago

I actually think it's okay to have a flag for that case, since customising faces is slightly orthogonal to toggling the behaviour, so I've added a new custom var in cc47480.

soupi commented 6 years ago

Thank you!