1

Here is how my company-mode's drop-downs look,

enter image description here enter image description here

As you can tell, they are uneven, ugly and somehow a different font than what my Emacs is using (Iosevka). I found this question, but did not quite understand the answer. It was also asked back in 2015 so maybe there is a better answer now?

My emacs is GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2019-09-16 and company-mode is at 20200324.2145. I am using doom-theme atom one.

I want the drop downs to look like they do in the screenshots present on the company-mode's website.

Is there a way to achieve this? I looked for configs pertaining to the company's drop downs but could not find anything. Is this a font issue? If so, could I just use a different font for company's drop downs (something that is not uneven), which font? Any recommendations? Maybe set it using use-package's custom face attribute?

Is there anything else I am missing or is there an easier solution?

2

Looks like you are using a variable-width font, not a fixed-width font, for those menu items. Find out which Emacs face is used for Company menu items, and change its font to a fixed-width font by using M-x customize-face.

I don't use Company, but a quick look at company-template.el, which is where its faces are defined, suggests that maybe the face you need to customize is company-tooltip.

Try:

;; company
(use-package company
  :ensure t
  :custom-face
  (company-tooltip
   ((t (:family "Iosevka")))))
| improve this answer | |
  • I had to use M-x customize-face to set the font family of company-tooltip variable. That fixed the raggedness. If you incorporate that in your answer, I'll accept it. – scribe Apr 26 at 21:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.