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>
@@ -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"
+ }
+}
+```