How to use project .clang_complete file? #112

ELLIOTTCABLE opened this Issue Dec 24, 2011 · 6 comments


None yet
4 participants

The :help clang_completion documentation doesn't actually describe what to put in a .clang_completion file. It just says “containing the compiler options,” which is opaque.

  • Do I copy-paste the exact command-line into a single line in the .clang_completion?
  • What about the linker command?
  • Do I put a single library-name, as passed to -l, on each line?

I have no idea what to do, here.

You put include paths in relative to the location of .clang_complete as you would for the compiler command.


@kaelic with multiple ones, do they go on individual lines, or together?

> cat .clang_complete

… or …

> cat .clang_complete
-lncurses -panel

It's for include paths, to find headers. It's not for linking libraries, not sure what you're trying to do there.


xaizek commented Dec 25, 2011

@ELLIOTTCABLE options should go on individual lines (multiple options on one line can work sometimes too, but since there are some conditions it's better to have one option per line).

@kaelic .clang_complete isn't just for include paths, since it can also contain architecture type, frameworks, path to precompiled headers file etc.

Linking isn't performed during completion, so one doesn't need to specify any of linker arguments in .clang_complete file, they will lead to completion failure when using clang executable and completely ignored by libclang.

My mistake :)

@xaizek thanks! I'll leave the issue open, so you can remember to document this stuff in the helpfile. (=

@Rip-Rip Rip-Rip closed this in 2470ac0 Jan 2, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment