abo-abo / function-args

C++ completion for GNU Emacs
120 stars 10 forks source link

Integrate function-args with Semantic Clang #10

Closed tuhdo closed 9 years ago

tuhdo commented 10 years ago

Clang is now commonly used for code navigation/completion backends, i.e. flycheck-clang, company-complete, auto-complete-clang... but Semantic has a contribution package for integrating Semantic with Clang. It's as good as other clang solutions (it's Clang after all). I think it would be great if function-agrs can provide the same Helm frontend like that along with fa-show utility.

It's pretty good. To use Semantic with Clang, load contrib packages in CEDET then load Clang package:

(require 'semantic/bovine/clang)

Then in a C/C++ buffer, activate it by the command semantic-clang-activate. After activating, semantic-ia-complete-symbol uses Clang to provide completion. The output is like this:

out

In the screenshot, I added Linux kernel (cloned from github mirror) include path like this:

(add-to-list 'semantic-clang-arguments "-I/home/tuhdo/linux/include")

Currently, using moo-complete when semantic-clang is activated gave me this error:

moo-variable=: Wrong type argument: listp, "_RandomAccessIterator __first"

Probably, moo-complete should check to see whether semantic-clang is activated and cooperate better.