When I type the first few letters of some C/C++ keywords, company does't respond until I execute company-keywords
.
How could I make company auto complete C/C++ keywords while I type?
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.
Sign up to join this communityWhen I type the first few letters of some C/C++ keywords, company does't respond until I execute company-keywords
.
How could I make company auto complete C/C++ keywords while I type?
There is two variables you can configure to make company behave the way you want:
(setq company-minimum-prefix-length 1)
(setq company-idle-delay 0.1)
This will make company start the completion 0.1 second after you type the first character. You can play with those until you have what you need
I had the same problem. Turns out company mode doesn't use multiple backends unless you group them. Problem occurred because I was adding the 'rtags' backend and it was preferred over company-keywords
backend. This is how I fixed it:
(push '(company-rtags company-keywords) company-backends)
Now both backends are used by company mode.
M-x company-diag
. – Dmitry Dec 5 '15 at 5:31