Compare commits

...

3 Commits

Author SHA1 Message Date
Kunall Banerjee
162b4c11c8 rewrite 2025-12-15 01:39:57 -05:00
Haojian Wu
bab9f72582 clangd -> clangd 2025-12-07 22:11:11 +01:00
Haojian Wu
77fa46a7c9 Document implemented clangd extensions in cpp.md 2025-12-06 22:26:02 +01:00

View File

@@ -156,3 +156,29 @@ 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
<!--Allows clients to communicate regions of code that are inactive due to preprocessor directives, such as `#if`, `#ifdef`, or `#ifndef` blocks that evaluate to false.
Code disabled by preprocessor directives (`#if 0`, false `#ifdef` conditions, etc.) is automatically detected and visually dimmed.-->
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"
}
}
```