Hl-line has the same color as background
andreyorst opened this issue · 15 comments
It started here doomemacs/themes#488, but I've actually figured out that this happens due to solaire alone. Here's minimal init.el:
minimal init.el
(require 'use-package)
(use-package doom-themes
:custom
(doom-themes-enable-bold t)
(doom-themes-enable-italic t)
:config
(load-theme 'doom-one t)
(set-face-attribute 'highlight nil
:foreground 'unspecified
:distant-foreground 'unspecified
:background 'unspecified))
(use-package solaire-mode
:commands (solaire-global-mode
solaire-mode-swap-bg
turn-on-solaire-mode
solaire-mode-in-minibuffer
solaire-mode-reset)
:hook (((after-revert
change-major-mode
org-src-mode) . turn-on-solaire-mode)
(snippet-mode . solaire-mode))
:config
(solaire-mode-swap-bg)
(with-no-warnings
(if (boundp 'after-focus-change-function)
(add-function :after after-focus-change-function #'solaire-mode-reset)
(add-hook 'focus-in-hook #'solaire-mode-reset)))
:init (solaire-global-mode +1))
After running M-x disable-theme RET solair-swap-bg-theme RET
we get this:
this issue makes treemacs unusable when cursor is turned off
Also happens in Magit buffers.
Interestingly, if I M-x disable-theme RET solaire-swap-bg-theme RET
, and then M-: (solaire-mode-swap-bg) RET
, then hl-line
has correct color.
It should be related to 5baf494.
My workaround is (setq solaire-mode-auto-swap-bg t)
.
My workaround is (setq solaire-mode-auto-swap-bg t)
Doesn't work for me
My workaround is (setq solaire-mode-auto-swap-bg t)
Doesn't work for me
Note that this has to be done before your theme is loaded.
My workaround is (setq solaire-mode-auto-swap-bg t)
Doesn't work for me
Note that this has to be done before your theme is loaded.
yes, I know. The background is swapped correctly, but the issue with hl-line is not fixed by adding this.
@andreyorst This appears to be an issue with the doom-one
theme, rather than solaire-mode, because doom-dracula
works fine (because it assigns a different color to solaire-hl-line-face
). I'll look into it soon.
On second read, the issue was in solaire-mode. As of b6cc22e this issue should be resolved. Two things to keep in mind with this update:
-
Your autoloads file must be loaded before your theme is. i.e. An isolated test won't work without a
(require 'solaire-mode-autoloads)
before the theme is loaded. In the context of normal installation it should work without extra configuration, however. -
The
solaire-mode-swap-bg
function is now deprecated and does nothing. It was replaced withsolaire-mode-auto-swap-bg
andsolaire-mode-themes-to-face-swap
variables. The former is enabled by default, but the latter will only auto-swap^doom-*
themes by default.
Let me know if this doesn't address your issue and I'll reopen it. Thanks for bringing it to my attention!
Thanks for fixing it, @hlissner !
But it seems not working for me. At the first time, hl-line is not displayed. Re-loading the same theme, it's displayed.
After my troubleshooting, I found the solution is enabling hl-line-mode
before loading solaire-mode
.
The issue still exists.
doesn't work for me either. I've also made sure that solaire loaded and configured before theme is loaded.
By the way, prior to 5baf494 it was possible to load solaire after theme and it worked just fine. What is the reason to change solaire in a way that requires to load solaire before theme?
cd63b67 removes load order constraints between hl-line and solaire-mode. Please let me know if that fixes your issue.
cd63b67 removes load order constraints between hl-line and solaire-mode. Please let me know if that fixes your issue.
Seems working now! Thanks a lot
I can confirm it's working now. Thank you!