docs: Document implemented clangd extensions (#44308)

Zed currently doesn’t support all protocol extensions implemented by
`clangd`, but it does support two:

- `textDocument/inactiveRegion`
- `textDocument/switchSourceHeader`

Release Notes:

- N/A

---------

Co-authored-by: Kunall Banerjee <hey@kimchiii.space>
This commit is contained in:
Haojian WuandKunall Banerjee authored and GitHub committed 2025-12-15 02:16:48 -05:00
1 parent a3a36dcc01
commit dd94bbcb79
1 file changed
+23
+23
View File
@@ -158,3 +158,26 @@ You can use CodeLLDB or GDB to debug native binaries. (Make sure that your build
}
]
```
## Protocol Extensions
Zed currently implements the following `clangd` [extensions](https://clangd.llvm.org/extensions):
### Inactive Regions
Automatically dims inactive sections of code due to preprocessor directives, such as `#if`, `#ifdef`, or `#ifndef` blocks that evaluate to false.
### Switch Between Source and Header Files
Allows switching between corresponding C++ source files (e.g., `.cpp`) and header files (e.g., `.h`).
by running the command {#action editor::SwitchSourceHeader} from the command palette or by setting
a keybinding for the `editor::SwitchSourceHeader` action.
```json [settings]
{
"context": "Editor",
"bindings": {
"alt-enter": "editor::SwitchSourceHeader"
}
}
```