I have no idea what I am doing. I decided to use Vim as my only editor, I'm trying to set up autocompletion and syntax checking.
So I need to configure a .ccls file in the root of my project (and I don't want to generate a compile_commands.json file so please don't tell me about it). But there is no detailed documentation whatsoever on .ccls because all it does is use compiler flags, which of course I don't know; I have started not too long ago in C++ and I don't know any CMake, I was used to just run my code from the IDE!
I know that the default code to put in my .ccls is the path to my includes, which I do put (which are 5 paths that I get using clang++ -E -x c++ - -v < /dev/null) and I'm on mac btw. I put these, I get autocompletion, but my source breaks with errors telling things like iostream and every other header does not exist in /usr/local/include even though I provided 4 other paths (it really doesn't exit in /usr/local/include I don't know where iostream and those others are) and that I can't cout << "Hello, World!" << endl for example because ostream and char[] are incompatible and things like that. BTW even if I use compile_commands.json I still get errors it only fixes my header paths.
Can someone just explain how to use .ccls? No links, just plain explanation. Or at least a default configuration to get me going.
P.S Do I also need to provide paths to my project's header files?
This is my .ccls:
clang++
%cxx -std=c++17
%cxx -stdlib=libc++
%hxx --include=Global.h
%cxx -I/usr/local/include
%cxx -I/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1
%cxx -I/Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include
%cxx -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include
%cxx -I/Library/Developer/CommandLineTools/usr/include