Skip to content

Instantly share code, notes, and snippets.

@FederAndInk
Last active December 16, 2021 19:50
Show Gist options
  • Save FederAndInk/0d455e5af9f61671822c8360e467ff76 to your computer and use it in GitHub Desktop.
Save FederAndInk/0d455e5af9f61671822c8360e467ff76 to your computer and use it in GitHub Desktop.
ccls vscode config
"C_Cpp.autocomplete": "Disabled",
"C_Cpp.errorSquiggles": "Disabled",
"C_Cpp.intelliSenseEngine": "Disabled",
"ccls.cache.directory": "${workspaceFolder}/.vscode/.ccls-cache/",
"ccls.misc.compilationDatabaseDirectory": "${workspaceFolder}/build",
"ccls.codeLens.localVariables": true,
"ccls.completion.caseSensitivity": 1,
"ccls.completion.enableSnippetInsertion": true,
"ccls.highlight.enum.face": [
"enabled",
"color: #3ea0d2"
],
"ccls.highlight.function.colors": [
"#927754"
],
"ccls.highlight.function.face": [
"enabled"
],
"ccls.highlight.globalVariable.face": [
"variable",
"textDecoration: underline"
],
"ccls.highlight.macro.colors": [
"#417b2f"
],
"ccls.highlight.memberFunction.face": [
"enabled",
"color: #e2bf8f"
],
"ccls.highlight.memberVariable.face": [
"enabled",
"color: #6cbcdf"
],
"ccls.highlight.namespace.colors": [
"#58bf89"
],
"ccls.highlight.parameter.face": [
"enabled",
"color: #eb992c"
],
"ccls.highlight.staticMemberFunction.face": [
"memberFunction",
"fontStyle: italic"
],
"ccls.highlight.staticMemberVariable.face": [
"enabled",
"color: #6cbcdf",
"fontStyle: italic"
],
"ccls.highlight.staticVariable.face": [
"enabled",
"color: #991cdf",
"fontStyle: italic"
],
"ccls.highlight.type.colors": [
"#ad3f87"
],
"ccls.highlight.type.face": [
"enabled",
"fontWeight: bolder"
],
"ccls.highlight.variable.colors": [
"#C7D4D3"
],
"ccls.highlight.variable.face": [
"enabled"
],
@FederAndInk
Copy link
Author

FederAndInk commented Dec 16, 2021

build ccls:

git clone --recursive https://github.com/FederAndInk/ccls

# if you forgot to recursive clone
git submodule init
git submodule update

cd ccls
mkdir build
cd build
# adjust the install prefix AND clang++-VER if needed
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/.local -DCMAKE_CXX_COMPILER=clang++ -DCLANG_LINK_CLANG_DYLIB=on -DUSE_SYSTEM_RAPIDJSON=off
cmake --build . -j
cmake --build . --target install

in the config (set to your username/home):

"ccls.launch.command": "/home/USER/.local/bin/ccls",

@FederAndInk
Copy link
Author

LLVM and clang: https://apt.llvm.org/

don't forget to install the dev libs! llvm-13-dev clang-13 libclang-13-dev libclang-cpp13-dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment