how to add company-dict to current backends group?
Closed this issue · 1 comments
futurist commented
Where there's so many company models, and I want to add the company-dict to current major company-backends, which extend current major backend, not to replace it.
How to do that?
Thanks!
hlissner commented
Hey, I'm not quite sure what you're asking.
If you want to add company-dict as a backend for a specific major mode, you can do:
(add-hook 'c++-mode-hook
(lambda ()
(make-local-variable 'company-backends)
(add-to-list 'company-backends 'company-dict)))
Alternatively, if you want more than one backend active at once, then you can set them explicitly:
(add-hook 'c++-mode-hook
(lambda ()
(set (make-local-variable 'company-backends)
'((company-dict company-irony)))))
I hope that helps!