1# C++
2
3C++ support is available natively in Zed.
4
5- Tree Sitter: [tree-sitter/tree-sitter-cpp](https://github.com/tree-sitter/tree-sitter-cpp)
6- Language Server: [clangd/clangd](https://github.com/clangd/clangd)
7
8## Binary
9
10You can configure which `clangd` binary Zed should use.
11
12To use a binary in a custom location, add the following to your `settings.json`:
13
14```json
15{
16 "lsp": {
17 "clangd": {
18 "binary": {
19 "path": "/path/to/clangd",
20 "arguments": []
21 }
22 }
23 }
24}
25```
26
27If you want to disable Zed looking for a `clangd` binary, you can set `ignore_system-version` to `true`:
28
29```json
30{
31 "lsp": {
32 "clangd": {
33 "binary": {
34 "ignore_system_version": true
35 }
36 }
37 }
38}
39```
40
41## More server configuration
42
43In the root of your project, it is generally common to create a `.clangd` file to set extra configuration.
44
45```text
46CompileFlags:
47 Add:
48 - "--include-directory=/path/to/include"
49Diagnostics:
50 MissingIncludes: Strict
51 UnusedIncludes: Strict
52```
53
54For more advanced usage of clangd configuration file, take a look into their [official page](https://clangd.llvm.org/config.html).