mirror of
https://github.com/zed-industries/zed.git
synced 2026-07-09 16:00:35 +00:00
Candidate fix for #59822. Adds a live preview pane to the project symbols picker, matching the file finder and project search pickers. When the selection moves, the selected symbol's file is shown in the preview with its declaration line highlighted and vertically centered. ## Changes - `project_symbols`: construct the picker with `uniform_list_with_preview`; asynchronously open the buffer for the selected symbol (cached by candidate id, cleared on each new query) and implement `try_get_preview_data_for_match` to return the buffer plus the symbol's anchor range. - `picker`: add a public `refresh_preview` so a delegate can push preview data once a buffer finishes opening asynchronously (the symbol buffer is not available synchronously, unlike text search which already holds open buffers). #### Before <img width="1725" height="712" alt="image" src="https://github.com/user-attachments/assets/21dcd7d6-7cc4-4de8-ab7d-2f1ce143e814" /> ##### After <img width="1725" height="712" alt="image" src="https://github.com/user-attachments/assets/db981db8-0a61-43bc-9838-c01b7bdbbf78" /> Can turn preview pane off by clicking at the bottom button! ## AI disclosure AI was used for understanding the codebase and formatting this PR. Release Notes: - Added a preview pane to the project symbols picker --------- Co-authored-by: Yara <git@yara.blue> |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| LICENSE-GPL | ||