sebastiencs / company-box

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

How to configure border width and colour? #199

Open SreenivasVRao opened 1 year ago

SreenivasVRao commented 1 year ago

I'd like a white border on both the completion suggestions and the documentation. How do I do that?

I think I need to modify company-box-frame-parameters / company-box-doc-frame-parameters...

image

djs42012 commented 1 year ago

Would like to know the same! I've tried:

(after! company-box
  (setq company-box-frame-parameters
        '((border-width . 1)
          (border-color . "#ffffff")
          (left . -1)
          (no-accept-focus . t)
          (no-focus-on-map . t)
          (min-width . 0)
          (width . 0)
          (min-height . 0)
          (height . 0)
          (internal-border-width . 3)
          (horizontal-scroll-bars)
          (left-fringe . 0)
          (right-fringe . 0)
          (menu-bar-lines . 0)
          (tool-bar-lines . 0)
          (line-spacing . 0)
          (undecorated . nil)
          (top . -1)
          (visibility)
          (mouse-wheel-frame)
          (no-other-frame . t)
          (cursor-type)
          (drag-internal-border . t)
          (left-fringe . 0)
          (right-fringe . 0)
          (tab-bar-lines . 0)
          (no-special-glyphs . t)))
          (left . -1)
          (border-color . "#ffffff")
          (no-accept-focus . t)
          (no-focus-on-map . t)
          (min-width . 0)
          (width . 0)
          (min-height . 0)
          (height . 0)
          (internal-border-width . 3)
          (horizontal-scroll-bars)
          (left-fringe . 0)
          (right-fringe . 0)
          (menu-bar-lines . 0)
          (tool-bar-lines . 0)
          (line-spacing . 0)
          (undecorated . nil)
          (top . -1)
          (visibility)
          (mouse-wheel-frame)
          (no-other-frame . t)
          (cursor-type)
          (drag-internal-border . t)
          (left-fringe . 0)
          (right-fringe . 0)
          (tab-bar-lines . 0)
          (no-special-glyphs . t))))

but no luck

SPFabGerman commented 4 months ago

I have the following code, that I think solves your issue:

(set-face-attribute 'child-frame-border nil :background "#ffffff")
(setq company-box-doc-frame-parameters '((left-fringe . 10) (right-fringe . 10)))

The important part is the first line, which changes the color of the border. The second line basically just readds the fringes to the documentation window, so that the text isn't literally hugging the border, which makes it look a bit nicer.