Home

Awesome

This Project is DEPRECATED! Please Try ncm-clang Instead.

Introduction

The original clang_complete was created by Xavier Deguillard and Tobias Grosser.

I'm maintaining this fork, with lots of code refactored and simplified, for better integration with NCM.

Here's some of the work in brief.

Requirements

To get clang_complete working with NCM you must install the neovim Python package for Python 2. clang_complete is invoked with the Python 2 interpreter, not the Python 3 interpreter, because the clang Python bindings only support Python 2.

Installation

Assuming you're using vim-plug.

Plug 'roxma/clang_complete'

Configuration tips

" path to directory where library can be found
let g:clang_library_path='/usr/lib/llvm-3.8/lib'
" or path directly to the library file
let g:clang_library_path='/usr/lib64/libclang.so.3.8'
" <Plug>(clang_complete_goto_declaration_preview)
au FileType c,cpp  nmap gd <Plug>(clang_complete_goto_declaration)
-DDEBUG
-include ../config.h
-I../common
-I/usr/include/c++/4.5.3/
-I/usr/include/c++/4.5.3/x86_64-slackware-linux/
.clang_complete: Makefile
	echo $(CXXFLAGS) > $@

If you are using cmake, unfortunately, I don't have a decent hack. This might work. Currently I use make VERBOSE=1 to show the compile command and then edit the .clang_complete manually.

	let g:neomake_cpp_enabled_makers = ['clang']
	let g:neomake_c_enabled_makers = ['clang']

License

See doc/clang_complete.txt for help and license.