1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:47:35 +00:00

Documentation: Recommend disabling clangd's IncludeCleaner feature

This commit is contained in:
Andrew Kaster 2024-02-05 04:28:11 -07:00 committed by Andrew Kaster
parent e6762e8d4d
commit 713698d2ca
3 changed files with 15 additions and 0 deletions

View file

@ -25,8 +25,15 @@ Depending on which configuration you use most, set the CompilationDatabase confi
CompileFlags:
Add: [-D__serenity__]
CompilationDatabase: Build/x86_64
Diagnostics:
UnusedIncludes: None
MissingIncludes: None
```
The UnusedIncludes and MissingIncludes flags are used to disable the [Include Cleaner](https://clangd.llvm.org/design/include-cleaner) feature of newer clangd releases.
It can be re-enabled if you don't mind the noisy inlay hints and problems in the problem view.
Run ``./Meta/serenity.sh run`` at least once to generate the ``compile_commands.json`` file.
In addition to the ``.clangd`` file, the ``settings.json`` file below has a required ``clangd.arguments`` entry for ``--query-driver`` that allows clangd to find the cross-compiler's built-in include paths.