sebastiencs / company-box

A company front-end with icons
561 stars 64 forks source link

company-box not displaying candidate icons #113

Closed stardiviner closed 4 years ago

stardiviner commented 4 years ago

When I use source code version company-box, the icons display fine. But when I switched to MELPA version, the icons is not displaying.

I use following config:

(use-package company-box
  ;; :ensure t
  :load-path "~/Code/Emacs/company-box"
  :delight company-box-mode
  :hook (company-mode . company-box-mode)
  :custom (;; (company-idle-delay 0.5) ; increase delay to avoid fast input slow down company speed.
           (company-box-doc-delay 0.5)
           ;; (company-box-show-single-candidate t) ; for still can use doc popup keybinding.
           ;; (company-box-doc-enable nil) ; disable auto `company-box-doc' timer.
           ;; (company-box-icons-image-size 25)
           ))

When I use :ensure t to use MELPA, and use :load-path "..." to use source code version.

And here is the screenshot

image

I tried emacs -q, it has this problem too. This is very weird.

Then I try to Edebug on company-box icons related functions, but no lucky, I can see the icon strings. and images text properties. But I can't know whether they are displayed. (In the screenshot, I can see the space before candidate, this must be left for image icons).

Do you have any idea how to debug this? @sebastiencs

sebastiencs commented 4 years ago

What melpa version are you using ? Can you try to update it ? Also, can you try:

(byte-recompile-directory (file-name-directory (find-library-name "company-box")) 0 t)
stardiviner commented 4 years ago

I'v already updated to latest version 20200810.557. I also tried your command to recomile company-box. then restart Emacs. still same problem. I checked source code master branch version company-box. Same code, why source code version can display icons, and MELPA version can't. Really weird. Can't figure out why.

sebastiencs commented 4 years ago

I just tried the melpa version and I have the same behavior (no icons), I will find a solution

stardiviner commented 4 years ago

That's great, I've been thinking my computer weird problem be somewhere I can't find out.

sebastiencs commented 4 years ago

@stardiviner https://github.com/sebastiencs/company-box/commit/20384f0e382c063173b9d863344b1b23bc1e4954 should fix the issue

stardiviner commented 4 years ago

Confirm fixed. Thanks a lot for your work!! :)