diff --git a/Visual-Studio-Code.md b/Visual-Studio-Code.md new file mode 100644 index 0000000..ebc46fa --- /dev/null +++ b/Visual-Studio-Code.md @@ -0,0 +1,45 @@ +## Install extension + +Install the ccls extension from the marketplace [here](https://marketplace.visualstudio.com/items?itemName=ccls-project.ccls). The source code is located at . + +If you run into issues, you can view debug output by running the +(`F1`) `View: Toggle Output` command and opening the `ccls` output section. + +## Setting up the extension + +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. + +```json +{ + "ccls.launch.command": "/path/to/ccls/Release/ccls", + "ccls.cacheDirectory": "/tmp/.ccls-cache/" +} +``` + +### `ccls.index.extraClangArguments` + +If for whatever reason you cannot generate a `compile_commands.json` file, you +can add the flags to the `ccls.clang.extraArgs` configuration +option. + +### Semantic highlighting + +The Visual Studio Code ccls extension supports [semantic highlighting](https://medium.com/@evnbr/coding-in-color-3a6db2743a1e). To enable, put into settings.conf (or workspace configuration): + +```json +"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, +``` diff --git a/_Sidebar.md b/_Sidebar.md index 84fb982..646315b 100644 --- a/_Sidebar.md +++ b/_Sidebar.md @@ -8,4 +8,5 @@ - [[Emacs]] - [[Neovim]] - [[Vim]] -* [[Debugging]] \ No newline at end of file + - [[Visual Studio Code]] +* [[Debugging]]