So I have been using NeoVim for some time and installed the clang_complete plugin. It works well with neovim when I am working in C files. It even works for my c++ project files when I add the include directory to the .clang_compete file as
-Isrc/include
But it does not work for standard c++ header files.
I installed llvm in my macos with brew
brew install llvm
It is installed at /usr/local/Cellar/llvm/10.0.0_1/ and linked at /usr/local/opt/llvm/
My ~/.zshrc file:
export PATH="/usr/local/opt/llvm/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/llvm/lib"
export CPPFLAGS="-I/usr/local/opt/llvm/include"
ctags=/usr/local/bin/ctags
export CC=/usr/local/opt/llvm/bin/clang
export CXX=/usr/local/opt/llvm/bin/clang++
export CPATH="/usr/local/opt/llvm/include"
alias gcc="clang"
alias g++="clang++"
My init.vim file:
let g:clang_library_path='/usr/local/opt/llvm/lib'
let g:clang_user_options='|| exit 0'
let g:clang_user_options = '-std=c++14 -Wall -DDEGUB -I/usr/local/llvm/include'
I also tried to change my .clang_complete to :
I/usr/local/opt/llvm/include/c++/v1/
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/
But it does not work for C++ standard libraries.