Golevka / emacs-clang-complete-async

An emacs plugin to complete C and C++ code using libclang
360 stars 71 forks source link

How to enable clang complete async only for C or C++ mode? #55

Open yuezhu opened 10 years ago

yuezhu commented 10 years ago

In your setup guide, clang complete async is activated when c-mode-common-hook executes. This causes clang complete async to be incorrectly activated in other modes that are submodes of cc-mode, like java-mode. I was trying to place the ac-cc-mode-setup in c++-mode-hook. It works without problem when I directly opened a C++ source file, but fails to work when I created a new C++ source file in Emacs.