company-quickhelp icon indicating copy to clipboard operation
company-quickhelp copied to clipboard

[Question] Can color variables be theme-dependent?

Open AblatedSprocket opened this issue 4 years ago • 7 comments

Is it possible to customize company-quickhelp-color-background/foreground as theme faces? Or is there a better way to make these values theme-dependent?

AblatedSprocket avatar Aug 26 '20 12:08 AblatedSprocket

Answer: yes, the two vars could be turned into one face instead.

Then company-quickhelp--show could look up the face's attributes at runtime, to pass to pos-tip-show.

dgutov avatar Aug 26 '20 15:08 dgutov

Do you know how to link variables to faces in this way? Or any resources for how this flow would work? I'm not great with elisp and I don't know what the code would look like for this.

AblatedSprocket avatar Aug 26 '20 19:08 AblatedSprocket

The change would just remove the vars and add the face, I think. Having it pick up existing color customization is possible, but probably more trouble than it is worth.

dgutov avatar Aug 26 '20 21:08 dgutov

Now that I'm looking more at the repo, isn't there an open PR for this?

AblatedSprocket avatar Aug 27 '20 12:08 AblatedSprocket

Actually, yes. It is close, but not exactly the same changes that I described above.

And it seems to be hung on an orthogonal issue.

dgutov avatar Aug 27 '20 21:08 dgutov

Would you take a PR with just the face changes from the existing PR?

AblatedSprocket avatar Aug 28 '20 00:08 AblatedSprocket

Sure.

dgutov avatar Aug 28 '20 12:08 dgutov