14

When using custom company backends, company-complete ends up returning no completions due to a misbehaving backend. In such cases, it would be helpful to know out which company backend was used to generate the list of completions. How do I get this information after a company-complete invocation?

Pradhan
  • 2,330
  • 14
  • 28

3 Answers3

25

You can type M-x company-diag now, and see the used backend in the resulting buffer.

Dmitry
  • 3,508
  • 15
  • 20
9

company has a very useful feature that modifies its modeline lighter to display the backend currently in use.

wasamasa
  • 21,803
  • 1
  • 65
  • 97
  • 1
    What is that feature and how do I enable it? – Andreas Raster Jun 12 '18 at 23:36
  • 2
    Exactly what I wrote in the answer: The currently used backend is displayed in the modeline. It's unconditionally enabled. – wasamasa Jun 14 '18 at 08:02
  • I am not seeing it. That probably means Moritz answer applies to me or I have disabled it and forgotten about it. Thanks for the clarification. – Andreas Raster Jun 14 '18 at 13:48
  • Nor am I seeing it. I simply see `company` in the modeline. @Dmitry's answer does work here. – jrm Jun 27 '18 at 17:42
  • I strongly suggest you to start with a minimal Emacs session (`emacs -Q` followed by `M-x package-initialize` and evaluating your company config) to exclude any interference of your init file. – wasamasa Jun 27 '18 at 19:50
1

If the first answer does not work:

Using the package elpy, hides the company lighter in the modeline (even in other major modes). Same might be true for globally installed major modes.