summaryrefslogtreecommitdiff
path: root/Documentation/HelixConfiguration.md
blob: baf5117572b54011c8364c602cd4d75783769437 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Helix Configuration
Helix comes with support for `clangd` and `clang-format` out of the box! However, a small bit of configuration is needed for it to work correctly with SerenityOS.

The following `.clangd` should be placed in the project root:
```yaml
CompileFlags:
  CompilationDatabase: Build/x86_64 # Or whatever architecture you're targeting, e.g. aarch64
  Add: [-D__serenity__]
```

You also need to configure the clangd server to detect headers properly from the Serenity toolchain. To do this, create a `.helix/languages.toml` file in the project root:
```toml
[[language]]
name = "cpp"
language-server = { command = "clangd", args=["--query-driver=/path/to/serenity/Toolchain/Local/**/*", "--header-insertion=never"] }
```

> Make sure to replace `/path/to/serenity` with the actual path in the snippet above!