jdtsmith / kind-icon

Completion kind text/icon prefix labelling for emacs in-region completion
GNU Affero General Public License v3.0
174 stars 4 forks source link

Blend background doesn't work with cape-dabbrev #26

Closed konrad1977 closed 1 year ago

konrad1977 commented 1 year ago

When I am trying to auto-complete cape-dabbrev i got an error:

"Error in post-command-hook (corfu--post-command): (wrong-number-of-arguments #<subr color-rgb-to-hex> 0)"

(use-package kind-icon
  :after corfu
  :custom
  (kind-icon-default-face 'corfu-default) ; to compute blended backgrounds correctly
  (kind-icon-use-icons nil)
  (kind-icon-blend-background t)
  (kind-icon-blend-frac 0.15)
  :config
  (add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter))

If I turn off (kind-icon-blend-background nil)it work as expected.

jdtsmith commented 1 year ago

This has nothing to do with cape-dabbrev, but probably this means that the 'kind it provides (text) has a face specified in kind-icon-mapping that has no foreground. For whatever reason lots of themes do this. By default this face is shadow, but I have now removed that. See also #25. Update to 0.1.8 for the fix.

konrad1977 commented 1 year ago

Thanks for the explanation. I upgraded to 0.18 - its still the same issue, you are still referring to shadow in 0.18, even if you commit says different. Did you submit the wrong version to melpa?

jdtsmith commented 1 year ago

It's not on MELPA it's on ELPA. Please try it from the master branch and let me know if it is working.

jdtsmith commented 1 year ago

OK I have added even more defense against 'unspecified and bumped to 0.1.9 which should fix this once and for all. Feel free to comment again if not.

konrad1977 commented 1 year ago

Thanks, will try when it reaches Elpa. Added :foreground color to my themes now instead. I must say I really love kind-icon, thanks for making the package @jdtsmith