company-mode / company-quickhelp

Documentation popup for Company
GNU General Public License v3.0
374 stars 33 forks source link

[Question] Can color variables be theme-dependent? #110

Open AblatedSprocket opened 4 years ago

AblatedSprocket commented 4 years ago

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?

dgutov commented 4 years ago

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.

AblatedSprocket commented 4 years ago

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.

dgutov commented 4 years ago

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.

AblatedSprocket commented 4 years ago

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

dgutov commented 4 years ago

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.

AblatedSprocket commented 4 years ago

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

dgutov commented 4 years ago

Sure.