-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
flycheck-color-mode-line does not colorize properly the powerline #3
Comments
@arranger1044 I noticed this using some other themes like zenburn, I will check if I can find a way to make the powerline works with all themes. |
Not sure it's exactly related, |
Anybody have any idea how to fix this? I'm also unable to get this mode to work properly with powerline... |
When adding face remapping, the background of the face is no longer correct. This occurs in the flycheck-color-mode-line package: flycheck/flycheck-color-mode-line#3 This should fix the issue.
You can add the following after you load powerline (defun pl/background-color (face)
(let ((face face)
(fa (assoc face face-remapping-alist)))
(when fa
(setq face (car (cdr fa))))
(face-attribute face
(if (face-attribute face :inverse-video nil 'default)
:foreground
:background)
nil
'default))) I have added a pull request to try to fix this properly. |
This doesn't completely fix the issue. You have to call the powerline separators with the new fonts. Otherwise, it memoizes the wrong colors. I fixed it in ergoemacs-status by the following function (defun ergoemacs-status--sep (dir &rest args)
"Separator with DIR.
The additional ARGS are the fonts applied. This uses `powerline' functions."
(let ((separator (and (fboundp #'powerline-current-separator)
(intern (format "powerline-%s-%s"
(powerline-current-separator)
(or (and (eq dir 'left)
(car powerline-default-separator-dir))
(cdr powerline-default-separator-dir))))))
(args (mapcar
(lambda(f)
(let ((fa (assoc f face-remapping-alist)))
(if fa
(car (cdr fa))
f)))
args)))
(when (fboundp separator)
(let ((img (apply separator args)))
(when (and (listp img) (eq 'image (car img)))
(propertize " " 'display img
'face (plist-get (cdr img) :face))))))) If you use this function in your powerline theme, it will work since powerline will memoize the remapped fonts. |
@mattfidler Could you please elaborate? How can we use this as a fix? Thanks! |
I am not able to have
flycheck-color-mode-line
coexist properly withpowerline
since it does not colorize the endings of the separators as show in this picture:Here is my configuration:
but I suspect I'm missing something
The text was updated successfully, but these errors were encountered: