Skip to content

Commit 08fee2c

Browse files
authored
Add information about the compileCommands property
1 parent ea8a02d commit 08fee2c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Documentation/LanguageServer/c_cpp_properties.json.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"intelliSenseMode": "msvc-x64",
1010
"includePath": [ "${workspaceRoot}" ],
1111
"defines": [ "FOO", "BAR=100" ],
12+
"compileCommands": "/path/to/compile_commands.json"
1213
"browse": {
1314
"path": [ "${workspaceRoot}" ],
1415
"limitSymbolsToIncludedHeaders": true,
@@ -36,6 +37,10 @@
3637

3738
**defines**: If `"C_Cpp.intelliSenseEngine"` is set to "Default" in your settings file, this list of preprocessor symbols will be used by IntelliSense during the compilation of your source files. This is basically the same as the list of symbols you pass to your compiler with the `-D` switch.
3839

40+
**compileCommands**: If `"C_Cpp.intelliSenseEngine"` is set to "Default" in your settings file, the includes and defines discovered in this file will be used instead of the values set for `includePath` and `defines`. If the compile commands datasbase does not contain an entry for the translation unit that corresponds to the file you opened in the editor, then a warning message will appear and the extension will use the `includePath` and `defines` settings instead.
41+
42+
*For more information about the file format, see the [Clang documentation](https://clang.llvm.org/docs/JSONCompilationDatabase.html). Some build systems, such as CMake, [simplify generating this file](https://cmake.org/cmake/help/v3.5/variable/CMAKE_EXPORT_COMPILE_COMMANDS.html).*
43+
3944
**browse**: The set of properties used when `"C_Cpp.intelliSenseEngine"` is set to `"Tag Parser"` (also referred to as "fuzzy" IntelliSense, or the "browse" engine).
4045

4146
### Browse properties

0 commit comments

Comments
 (0)