0

New emacs user here.I have this problem where the suggestions aren't properly aligned only in the gui version.

Company-mode tooltips on emacs gui.

But it's working fine on the terminal version.

Company-mode tooltips

I have tried changing the company tooltip margin to a value 30 but neither the box will align nor the scrollbar will show. Any suggestions to fix this ?

  • Is there any special reason you're using a non-monospaced font in the GUI? – wasamasa May 12 '18 at 9:36
  • Not at all. Will it help if I use a monospaced font ? – Jonas May 12 '18 at 9:55
  • Yes, hence why I asked. – wasamasa May 12 '18 at 9:59
  • Sorry for the late reply but it worked like a charm ! Thank you wasamasa ! :D – Jonas May 12 '18 at 10:10
1

The difference between your screenshots is that the first uses a proportional font (where characters may be of different widths) and the second one uses a non-proportional AKA monospaced font (where all characters have the same width). Completion popups are laid out in text (as opposed to consist of a graphical tooltip with some text put inside) where the only way of alignment is to assume every character is equally wide and insert the appropriate amount of space characters. This will obviously break down if that assumption is violated. Customize your Emacs to use a monospaced font and everything will look fine again.

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.