clang_complete icon indicating copy to clipboard operation
clang_complete copied to clipboard

Accessing .h information for completion?

Open Goles opened this issue 10 years ago • 4 comments

Hello,

As far as I know there's no recursive way to add all my project .h files to make clang_complete use them for completion... so right now my .clang_complete file is full of:

-I ./External
-I ./External/Other
-I ./External/Other/Another

Is there a way to make clang_complete to automatically detect my .h files and take them into account for completion?

Goles avatar Apr 23 '14 17:04 Goles

On 23/04/2014 19:48, Nicolas Goles wrote:

Hello,

As far as I know there's no recursive way to add all my project .h files to make clang_complete use them for completion... so right now my .clang_complete file is full of:

-I ./External
-I ./External/Other
-I ./External/Other/Another

Is there a way to make clang_complete to automatically detect my .h files and take them into account for completion?

You could use a compilation database as it can e.g. be emitted by cmake builds.

Tobias

tobiasgrosser avatar Apr 23 '14 18:04 tobiasgrosser

Hey there, how could I make this? (sorry never used a Compilation Database before)

I'm using clang_complete with Objective-C so I mostly rely on my IDE for compiling.

Goles avatar Apr 23 '14 18:04 Goles

On 23/04/2014 20:16, Nicolas Goles wrote:

Hey there, how could I make this? (sorry never used a Compilation Database before)

I'm using clang_complete with Objective-C so I mostly rely on my IDE for compiling.

http://clang.llvm.org/docs/JSONCompilationDatabase.html

Specifically, https://github.com/rizsotto/Bear may be helpful.

Tobias

tobiasgrosser avatar Apr 23 '14 18:04 tobiasgrosser

Will check it out, thanks.

Goles avatar Apr 23 '14 18:04 Goles