This repository has been archived by the owner on Jan 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
ccls project
wangqi edited this page May 9, 2021
·
9 revisions
Here we will use ccls GitHub project to verify the IDE environment.
Follow the instructions in Quick Guide section to set up the gccIDE container. Don't forget to create the proj-vol
volume.
% cd ~/proj
% git clone https://github.com/MaskRay/ccls.git
% cd ccls
% cmake -H. -BDebug -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=YES
% ln -s Debug/compile_commands.json .
Copy and paste the following content into .ccls file.
clang
%cpp -std=c++17
%h -x c++-header
-I
/home/ide/proj/ccls/src
-isystem
/home/ide/proj/ccls/third_party
-isystem
/usr/lib/llvm10/include
-isystem
/home/ide/proj/ccls/third_party/rapidjson/include
-isystem
/usr/include/llvm10/
% pwd
/home/ide/proj/ccls
% vi
- Use
ctrl-ww
to choose themain.cc
file.Enter
to open it. - You need to wait some time to wait for the ccls to parse the source file in the background.
- Check
/tmp/ccls.log
to see the ccls log. - Now, you can test the code completion and find definition/declaration.