mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 21:37:58 +03:00
Documentation: Add instructions for configuring the Helix editor
This commit is contained in:
parent
052ca0a246
commit
9ed9a95c15
Notes:
sideshowbarker
2024-07-17 00:23:42 +09:00
Author: https://github.com/caoimhebyrne Commit: https://github.com/SerenityOS/serenity/commit/9ed9a95c15 Pull-request: https://github.com/SerenityOS/serenity/pull/19236
18
Documentation/HelixConfiguration.md
Normal file
18
Documentation/HelixConfiguration.md
Normal file
@ -0,0 +1,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!
|
Loading…
Reference in New Issue
Block a user