ZIm/crates/editor/src
Kirill Bulatov 28271a9a36
Display buffer/project search entries in the outline panel (#16589)
Prototypes a way to display new entities in the outline panel, making it
less outline.
The design is not final and might be adjusted, but the workflow seems to
be solid enough to keep and iron it out.

* Now, when any project search buffer is activated (multi buffer mode),
or buffer search is open (singleton buffer mode, but is available for
search usages multi buffer too — in that case buffer search overrides
multi buffer's contents display), outline panel displays all search
matches instead of the outline items.

Outline items are not displayed at all during those cases, unless the
buffer search is closed, or a new buffer gets opened, of an active
buffer search matches zero items.


https://github.com/user-attachments/assets/4a3e4faa-7f75-4522-96bb-3761872c753a


* For the multi buffer mode, search matches are grouped under
directories and files, same as outline items

![Screenshot 2024-08-21 at 14 55
01](https://github.com/user-attachments/assets/6dac75e4-be4e-4338-917b-37a32c285b71)


* For buffer search , search matches are displayed one under another


![image](https://github.com/user-attachments/assets/9efcff85-d4c7-4462-9ef5-f76b08e59f20)


For both cases, the entire match line is taken and rendered, with the
hover tooltip showing the line number.
So far it does not look very bad, but I am certain there are bad cases
with long lines and bad indents where it looks not optimal — this part
most probably will be redesigned after some trial.
Or, maybe, it's ok to leave the current state if the horizontal
scrollbar is added?

Clicking the item navigates to the item's position in the editor.
Search item lines are also possible to filter with the outline panel's
filter input.

* Inline panel is now possible to "pin" to track a currently active
editor, to display outlines/search results for that editor even if
another item is activated afterwards:


![image](https://github.com/user-attachments/assets/75fb78c3-0e5f-47b4-ba3a-485c71d7e342)

This is useful in combination with project search results display: now
it's possible to leave the search results pinned in the outline panel
and jump to every search result and back.

If the item the panel was pinned to gets closed, the panel gets back to
its regular state, showing outlines/search results for a currently
active editor.


Release Notes:

- Added a way to display buffer/project search entries in the outline
panel
2024-08-25 21:40:02 +03:00
..
display_map WIP: Improve performance of Wrap Map (#16761) 2024-08-23 18:59:30 +02:00
git Update http crate name (#15041) 2024-07-23 15:01:05 -07:00
scroll Allow to cycle through center/top/bot scroll positions (#16134) 2024-08-13 00:32:30 +03:00
signature_help lsp: Implement textDocument/signatureHelp for ProjectClientState::Local environment (#12909) 2024-07-11 13:38:33 +03:00
test chore: Bump Rust version to 1.80 (#15186) 2024-07-25 22:48:42 +02:00
actions.rs vim: Add 'gf' command, make files cmd-clickable (#16534) 2024-08-22 14:27:11 +02:00
blame_entry_tooltip.rs Copy/paste images into editors (Mac only) (#15782) 2024-08-13 13:18:25 -04:00
blink_manager.rs Hide blinking cursor when window is deactivated (#15408) 2024-07-30 10:49:15 +03:00
clangd_ext.rs clangd: Implement switch source/header extension (#14646) 2024-08-21 22:15:08 +03:00
debounced_delay.rs editor: Cancel ongoing completion requests more eagerly (#12630) 2024-06-04 12:22:01 +02:00
display_map.rs Make unnecessary code fade configurable (#14442) 2024-08-20 13:13:27 -04:00
editor.rs Fix ctrl-d/u issues with scroll_beyond_last_line off (#15395) 2024-08-23 08:34:40 -06:00
editor_settings.rs settings_ui: Add line number settings controls (#15310) 2024-07-26 18:31:45 -04:00
editor_settings_controls.rs ui: Give NumericSteppers an ID (#15344) 2024-07-27 13:02:27 -04:00
editor_tests.rs Fix a panic when diagnostics contain multiple links (#16601) 2024-08-21 11:18:43 -06:00
element.rs Add bounded soft wrap (#16586) 2024-08-22 12:51:32 -06:00
git.rs Introduce DisplayRow, MultiBufferRow newtypes and BufferRow type alias (#11656) 2024-05-11 00:06:51 +03:00
highlight_matching_bracket.rs Add support for auto surround (#13217) 2024-06-20 12:48:46 +03:00
hover_links.rs vim: Add 'gf' command, make files cmd-clickable (#16534) 2024-08-22 14:27:11 +02:00
hover_popover.rs Fix diagnostic popups not having a max width (#16092) 2024-08-14 16:37:35 +02:00
hunk_diff.rs Do not enable copilot for always read-only editors (#16356) 2024-08-16 17:22:47 +03:00
indent_guides.rs indent guides: Fix edge case when line is folded (#13498) 2024-06-25 12:00:40 +02:00
inlay_hint_cache.rs Handle buffer diff base updates and file renames properly for SSH projects (#14989) 2024-07-23 11:32:37 -07:00
inline_completion_provider.rs Truncate line when accepting inline suggestions for Supermaven (#13884) 2024-07-22 11:59:38 -07:00
items.rs Display buffer/project search entries in the outline panel (#16589) 2024-08-25 21:40:02 +03:00
linked_editing_ranges.rs lsp: Add support for linked editing range edits (HTML tag autorenaming) (#12769) 2024-06-11 15:52:38 +02:00
lsp_ext.rs clangd: Implement switch source/header extension (#14646) 2024-08-21 22:15:08 +03:00
mouse_context_menu.rs Add Format Buffer action to mouse context menu (#16080) 2024-08-23 13:44:34 -04:00
movement.rs Improve context expansion (#10957) 2024-05-26 16:30:09 -07:00
persistence.rs zed: Mark restored buffers as conflicted if file changed on disk between store & restore (#15207) 2024-07-25 18:04:47 +02:00
rust_analyzer_ext.rs clangd: Implement switch source/header extension (#14646) 2024-08-21 22:15:08 +03:00
scroll.rs Fix ctrl-d/u issues with scroll_beyond_last_line off (#15395) 2024-08-23 08:34:40 -06:00
selections_collection.rs vim: Support ranges in command (#15985) 2024-08-08 21:47:27 +01:00
signature_help.rs lsp: Implement textDocument/signatureHelp for ProjectClientState::Local environment (#12909) 2024-07-11 13:38:33 +03:00
tasks.rs refactoring: Use helper instead of adjusting selection manually (#15262) 2024-07-26 11:12:33 +02:00
test.rs Feature/fallback fonts (#15306) 2024-07-26 16:42:21 -07:00