Closed 354651432 closed 1 year ago
same issue here with emacs 28.2
once installes company-box the selected candidate is not hightlighted
So, I'm trying to figure out why it breaks (the code in the plugin really just inherits the colors of company-mode
, but due to the company-mode declaring colors through a list which I don't yet understand how it works, something breaks).
But if someone wants a quick fix, you can execute something like this:
(set-face-attribute 'company-box-selection nil :background "light blue")
It's probably related to how your theme you're using is defined. It's not the default one, right?
It's probably related to how your theme you're using is defined. It's not the default one, right?
Well, as a matter of fact it seems to be the default one. I don't see in my .emacs
file anything theme-changing related, except a variable custom-safe-themes
. IIRC at some point I settled with the default theme, because I disable a number of major-mode font-locks to make identifiers stand out per this advice anyway.
Hmm, that's unfortunate. I figured this issue only affects a number of people.
Maybe try installing and enabling company-posframe
instead? And see how it behaves.
If it doesn't have this problem, one could compare the implementations.
Maybe try installing and enabling
company-posframe
instead? And see how it behaves.
Works, as a matter of fact I see no difference with and without company-posframe-mode
enabled
If it doesn't have this problem, one could compare the implementations.
I looked at the code, apparently it has no problem compared to company-box
because it doesn't defface
selection face. It only has 6 uses of defface
, the only interesting ones are company-posframe-active-backend-name
and same for "inactive", Idk what they're for. But I doubt it's anything related to a completion selection face.
Ah, yup. I forgot that company-box
has its own set of faces. Not sure why it needs a separate set.
Ah, yup. I forgot that
company-box
has its own set of faces. Not sure why it needs a separate set.
Right, as I mentioned in the first comment, the problems comes to it inheriting the face which is somehow broken. But overriding the face directly like a (set-face-attribute 'company-box-selection nil :background "light blue")
makes it work.
So, I sent a PR that fixes the company-box
problem.
Basically, the problem was that the plugin was using its own faces before actually declaring them. IMO this should've raised a runtime error, but for some reason it didn't, and just resulted in a silent bug.
uncompany-boxed![gnome-shell-screenshot-QYB090](https://user-images.githubusercontent.com/8469080/133754930-dd833503-5fbd-498e-87f6-290226e9c139.png)
company-boxed
current item is
use-package-hush
, but its background hight light is missing