Add LSP call hierarchy modal (#53239)
<img width="1128" height="953" alt="image" src="https://github.com/user-attachments/assets/b2017c0a-e25a-49d7-9342-d074014d085c" /> Closes #14203 Release Notes: - Initial Call Hierarchy support in Zed --------- Co-authored-by: Alexey Olshanskiy <gh@aohoy.dev> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Kirill Bulatov <kirill@zed.dev>
This commit is contained in:
1 parent
941bd6fa99
commit
c684a6a537
51 files changed
+4026
-82
No files matched your search
@@ -42,6 +42,15 @@ Jump to where a symbol is defined with {#kb editor::GoToDefinition} (or `Cmd+Cli
|
||||
- **Current file:** {#kb outline::Toggle} opens an outline of symbols in the active file
|
||||
- **Entire project:** {#kb project_symbols::Toggle} searches symbols across all files
|
||||
|
||||
## Call Hierarchy
|
||||
|
||||
With the cursor on a function, {#action call_hierarchy::ShowIncomingCalls} ({#kb call_hierarchy::ShowIncomingCalls}) lists the functions that call it, and {#action call_hierarchy::ShowOutgoingCalls} lists the functions it calls.
|
||||
Both open a picker; selecting an entry jumps to the call site, and the secondary confirm opens it in an adjacent pane.
|
||||
While the picker is open, {#action call_hierarchy::ToggleDirection} switches between callers and callees, {#action menu::SelectChild} re-roots the hierarchy at the selected function to explore one level deeper, and {#action menu::SelectParent} steps back up; the picker's footer shows the corresponding key bindings.
|
||||
Both actions are also available in the editor's right-click menu.
|
||||
The modal's width can be changed via the `call_hierarchy.modal_max_width` setting.
|
||||
This requires the language server to support call hierarchy.
|
||||
|
||||
## Outline Panel
|
||||
|
||||
The Outline Panel ({#kb outline_panel::ToggleFocus}) shows a persistent tree view of symbols in the current file. It's especially useful with [multibuffers](./multibuffers.md) for navigating search results or diagnostics.
|
||||
|
||||
@@ -3570,6 +3570,14 @@ Examples:
|
||||
|
||||
`boolean` values
|
||||
|
||||
## Call Hierarchy
|
||||
|
||||
### Modal Max Width
|
||||
|
||||
- Description: Max-width of the call hierarchy modal. It can take one of these values: `small`, `medium`, `large`, `xlarge`, and `full`.
|
||||
- Setting: `modal_max_width`
|
||||
- Default: `medium`
|
||||
|
||||
## File Finder
|
||||
|
||||
### File Icons
|
||||
|
||||
Reference in new issue
Block a user