diff --git a/docs/src/languages/cpp.md b/docs/src/languages/cpp.md index c20dd58335caca45a6923cc0527605d6cc4b5564..629a0ab640e245bdfec41370fa966589728c2c94 100644 --- a/docs/src/languages/cpp.md +++ b/docs/src/languages/cpp.md @@ -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" + } +} +```