mirror of https://github.com/helix-editor/helix
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9e31ba5475
DynamicPicker is a thin wrapper over Picker that holds some additional state, similar to the old FilePicker type. Like with FilePicker, we want to fold the two types together, having Picker optionally hold that extra state. The DynamicPicker is a little more complicated than FilePicker was though - it holds a query callback and current query string in state and provides some debounce for queries using the IdleTimeout event. We can move all of that state and debounce logic into an AsyncHook implementation, introduced here as `DynamicQueryHandler`. The hook receives updates to the primary query and debounces those events so that once a query has been idle for a short time (275ms) we re-run the query. A standard Picker created through `new` for example can be promoted into a Dynamic picker by chaining the new `with_dynamic_query` function, very similar to FilePicker's replacement `with_preview`. The workspace symbol picker has been migrated to the new way of writing dynamic pickers as an example. The child commit will promote global search into a dynamic Picker as well. |
4 months ago | |
---|---|---|
.. | ||
picker | 4 months ago | |
completion.rs | 6 months ago | |
document.rs | 7 months ago | |
editor.rs | 5 months ago | |
info.rs | 6 months ago | |
lsp.rs | 6 months ago | |
markdown.rs | 6 months ago | |
menu.rs | 4 months ago | |
mod.rs | 4 months ago | |
overlay.rs | 2 years ago | |
picker.rs | 4 months ago | |
popup.rs | 6 months ago | |
prompt.rs | 4 months ago | |
spinner.rs | 7 months ago | |
statusline.rs | 6 months ago | |
text.rs | 9 months ago |