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

1 Answer 1

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)

8
  • 1
    I have installed company-box but nothing happens :-( // should I add any line into .emacs file
    – alper
    Commented Nov 9, 2020 at 12:26
  • Did you follow 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
    Commented Nov 9, 2020 at 12:34
  • 1
    Ah :-( is there any alternative package ?
    – alper
    Commented Nov 10, 2020 at 0:56
  • 1
    Oh! seems like there is, sorry but I didn't knew it (maybe I change my company-box) github.com/company-mode/company-quickhelp ,and it works in the terminal!
    – Fermin MF
    Commented Nov 10, 2020 at 1:08
  • 1
    ah still does not work :( seems like something is overwriting on my .emacs file
    – alper
    Commented Nov 10, 2020 at 2:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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