1

I am using company-mode for backends to auto-complete in Python and emacs is used as command line.

(add-hook 'after-init-hook 'global-company-mode)
(setq company-auto-complete t)

(setq company-auto-complete t)
(global-set-key (kbd "C-c C-k") 'company-complete)

During autocompletion, it shows the name of the fuctions and their type. In addition to those, I was wondering can it show the doc of the each function like jedi does (example first image on the jedi site)?


company (information of functions are missing on the right hand-side):

enter image description here

jedi:

enter image description here

alper
  • 1,238
  • 11
  • 30

1 Answers1

1

By default company-mode doesn't seems to have that feature, BUT there is a package called company-box that take care of the documentation among other things:

  • Without company-box: enter image description here

  • With company-box: enter image description here

(To trigger the doc, you may have to wait like a second)

Fermin MF
  • 635
  • 3
  • 8
  • 1
    I have installed `company-box` but nothing happens :-( // should I add any line into `.emacs` file – alper Nov 09 '20 at 12:26
  • Did you follow https://github.com/sebastiencs/company-box#installation ? If it is the case, some functions may not have documentation, or it may take some time to load (also point out that you have to scroll throw the company suggestion list, even if it is the first result, this can be done with company-select-next). If still doesn't work.. it may be something to do with your config or other package – Fermin MF Nov 09 '20 at 12:34
  • Yes but I haven't done any additional configuration. Also I am using emacs in the terminal. Seems like it is not compatible with terminal CLI – alper Nov 09 '20 at 21:52
  • Right! sorry about that, I'm not using Emacs in the command line, but yeah, according to the author it doesn't work in the terminal (https://github.com/sebastiencs/company-box/issues/103) – Fermin MF Nov 10 '20 at 00:23
  • 1
    Ah :-( is there any alternative package ? – alper Nov 10 '20 at 00:56
  • 1
    Oh! seems like there is, sorry but I didn't knew it (maybe I change my company-box) https://github.com/company-mode/company-quickhelp ,and it works in the terminal! – Fermin MF Nov 10 '20 at 01:08
  • 1
    ah still does not work :( seems like something is overwriting on my .emacs file – alper Nov 10 '20 at 02:32
  • A while ago, but are you still using this and do icons still show in the company candidates with company-box installed? – RichieHH Jul 28 '23 at 21:10