Clang Complete: Difference between revisions
No edit summary |
|||
| (8 intermediate revisions by 7 users not shown) | |||
| Line 16: | Line 16: | ||
You can compile/install vim as usual. The sole special thing that need be done for this compilation is that, when you call ./configure, you *need* to ensure the following flags are present: | You can compile/install vim as usual. The sole special thing that need be done for this compilation is that, when you call ./configure, you *need* to ensure the following flags are present: | ||
<pre>--enable-python3interp --enable-pythoninterp</pre> | <pre>--enable-python3interp=dynamic --enable-pythoninterp=dynamic</pre> | ||
and the following are absent | and the following are absent | ||
<pre>-- | <pre>--disable-python3interp --disable-pythoninterp</pre> | ||
Otherwise Clang Complete will fail. | Otherwise Clang Complete will fail. | ||
| Line 66: | Line 66: | ||
In order to specify other folders for autocomplete to search for headers, you need to place them (one per line, prefixed directly with '-I') into a .clang_complete file in the current working directory. (This file directly appends each line to the clang command, so if you need to use the C99 standard for a project, for example, you can do -std=c99 on a line of its own). | In order to specify other folders for autocomplete to search for headers, you need to place them (one per line, prefixed directly with '-I') into a .clang_complete file in the current working directory. (This file directly appends each line to the clang command, so if you need to use the C99 standard for a project, for example, you can do -std=c99 on a line of its own). | ||
An example of this file using the c++0x standard, and including Qt | An example of this file using the c++0x standard, and including Qt headers and libs from the current directory, is: | ||
<pre> | <pre> | ||
-std=c++0x | -std=c++0x | ||
| Line 73: | Line 73: | ||
-I. | -I. | ||
</pre> | </pre> | ||
== Troubleshooting == | == Troubleshooting == | ||
Clang Complete depends on a mostly working environment to work. It will generally not autocomplete from broken header files, etc. So, type the following into vim to see if it's your code or clang complete that is messed up: | Clang Complete depends on a mostly working environment to work. It will generally not autocomplete from broken header files, etc. So, type the following into vim to see if it's your code or clang complete that is messed up: | ||
| Line 85: | Line 86: | ||
If autocomplete pops up when you press the '.', it's your code/configuration that's not functioning properly. If autocomplete fails to pop up even when you press <C-x><C-u> (autocomplete), then the install probably has an issue. See [Other Include Paths] for more information if Clang Complete isn't working on a certain library. | If autocomplete pops up when you press the '.', it's your code/configuration that's not functioning properly. If autocomplete fails to pop up even when you press <C-x><C-u> (autocomplete), then the install probably has an issue. See [Other Include Paths] for more information if Clang Complete isn't working on a certain library. | ||
[[Category:Howtos]] | |||
[[Category:Software]] | |||