company-mode / company-quickhelp

Documentation popup for Company
GNU General Public License v3.0
374 stars 33 forks source link

ESS no documentation available #102

Closed safre19 closed 4 years ago

safre19 commented 4 years ago

When I try to show documentation in ESS mode, I get "No documentation available". It works in other mode.

Screen Shot 2020-06-18 at 2 41 49 PM

dgutov commented 4 years ago

What does M-x company-diag say?

safre19 commented 4 years ago

It says :

Emacs 26.3 (x86_64-apple-darwin19.0.0) of 2019-11-17 on d12frosted.local
Company 0.9.12

company-backends: (company-capf company-yasnippet)

Used backend: company-yasnippet
Major mode: ess-r-mode
Prefix: ""
Completions:
  #("#!" 0 2 (yas-prefix-offset 0 yas-template #s(yas--template "#!" "#!/usr/bin/env ${1:bash}
dgutov commented 4 years ago

If only the yasnippet backend is used, you might want to browse ESS's documentation to find out why its completion is not working. And what is needed to turn it on.

safre19 commented 4 years ago

Ok, I thought that by using ess-use-company it automaticly turned it on.

dgutov commented 4 years ago

That would be the question for ESS support.

Perhaps you need to launch an inferior process first, or something like that.

dgutov commented 4 years ago

Or perhaps they just don't implement the doc-buffer command.

safre19 commented 4 years ago

Ok I made it work by setting company-backends manually with C-h V to ((company-R-library company-R-args company-R-objects)). The thing is I am still new to emacs and I don't know how to setup company-backends in my config. I tried a lot of suggestions, but none of them worked.

dgutov commented 4 years ago

Was there a particular suggestion in ESS's docs that you tried?

safre19 commented 4 years ago

Solved thanks to this issue! This is what I added in my config.

(setq ess-use-company nil)
(after! ess-r-mode
  (set-company-backend! 'ess-r-mode
    '(:separate company-R-library company-R-args company-R-objects)))

Thanks for your help!

dgutov commented 4 years ago

I was wondering whether their official docs make this clear enough.

Anyway, glad you got this working.