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?

  • That depends on the backend that's being used. Try M-x company-diag.
    – Dmitry
    Dec 5 '15 at 5:31

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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