-
Notifications
You must be signed in to change notification settings - Fork 266
Visual Studio Code
Fangrui Song edited this page Sep 30, 2018
·
17 revisions
Install the ccls extension from the marketplace here. The source code is located at https://github.com/MaskRay/vscode-ccls.
If you run into issues, you can view debug output by running the
(F1
) View: Toggle Output
command and opening the ccls
output section.
To load vscode-ccls without installing:
code vscode-ccls
- Press F5
To tell the extension where to find ccls, either add ccls to your PATH
or set "ccls.launch.command" in User Settings to the absolute path pointing to ccls.
{
"ccls.launch.command": "/path/to/ccls/Release/ccls",
"ccls.cacheDirectory": "/tmp/.ccls-cache/"
}
If for whatever reason you cannot generate a compile_commands.json
file, you
can add the flags to the ccls.clang.extraArgs
configuration
option.
The Visual Studio Code ccls extension supports semantic highlighting. To enable, put into settings.conf (or workspace configuration):
"ccls.highlighting.enabled.types": true,
"ccls.highlighting.enabled.freeStandingFunctions": true,
"ccls.highlighting.enabled.memberFunctions": true,
"ccls.highlighting.enabled.freeStandingVariables": true,
"ccls.highlighting.enabled.memberVariables": true,
"ccls.highlighting.enabled.namespaces": true,
"ccls.highlighting.enabled.macros": true,
"ccls.highlighting.enabled.enums": true,
"ccls.highlighting.enabled.typeAliases": true,
"ccls.highlighting.enabled.enumConstants": true,
"ccls.highlighting.enabled.staticMemberFunctions": true,
"ccls.highlighting.enabled.parameters": true,
"ccls.highlighting.enabled.templateParameters": true,
"ccls.highlighting.enabled.staticMemberVariables": true,
"ccls.highlighting.enabled.globalVariables": true,