Open josdelien opened 1 year ago
Nota bene:
what I've described as my intended default search UX (for Cmd-x
), is currently already somewhat implemented in the "Outline View" (Cmd-Shift o
) modal, however that Outline view is limited to the LSP and file syntax tree.
==> Ideally I'd want to "merge" the current Search and Outline View functionality as the default Search behaviour, but not restricted to the current Outline View language syntax.
eg:
Cmd-F
should yield the current Outline View modal also bound to the underlying document bufferfn
as query to display all function definitionsNota bene:
in this specific example, using the search query fn
, Outline View happens to work. But let's say I'd for example use multiple comments throughout my code document with the word // TODO: ...
this currently won't show in the Outline View.
I've been using this in vim too with fzf. Use it all the time.
Another idea that I've been tinkering with for my setup is to adjust the weight of items depending on the proximity to where the cursor is.
Check for existing issues
Describe the feature
When searching (via
Cmd-F
) in a document, currently in Zed a search result modal opens with a way to toggle (using unbound<
and>
icon buttons with the mouse.) The problem with this UI/UX for document search is there's no quick overview, only an indication for the amount of search results found and a way to step over them.A much faster and more insightful way (see screenshot) I've configured in Emacs Lisp (see screenshot) which I'd like to see implemented in Zed as well:
This way, searching for common keywords (for example
fn
orstruct
in Rust, ordef
in Python) provides a very convenient and quick alternative to visual code folding or a mini-map to provide overview and quick intra-document navigation via keyboard bindings.If applicable, add mockups / screenshots to help present your vision of the feature
For example, in this
main.rs
(Rust) file,The minibuffer search solution I envision (screenshot: my own Emacs configuration written in Emacs Lisp) for document search/filter...
... versus what it is now (same document, in Zed)