See included install-ccls.sh
.
- Install dependencies:
sudo apt install clang-9 libclang-9-dev rapidjson-dev zlib1g-dev libncurses-dev
- Download archived CCLS source from github release page: Releases-MaskRay/ccls
- Unarchive:
tar -xzf ccls-0.20210330.tar.gz
- CMake build:
cmake -H. -BRelease -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/usr/lib/llvm-9 -DLLVM_INCLUDE_DIR=/usr/lib/llvm-9/include -DLLVM_BUILD_INCLUDE_DIR=/usr/include/llvm-9/
- CMake install:
sudo cmake --build Release
(c-c++ :variables c-c++-backend 'lsp-ccls)
cmake
lsp
If using CMake, add -DCMAKE_EXPORT_COMPILE_COMMANDS=1
to your cmake build command and then copy the resulting compile_commands.json
file from the build directory to your source or project directory.
If using Make directly, use a tool like Bear: bear make
or bear make build