helix-mirror/helix-term/src
Michael Davis 9e31ba5475
Consolidate DynamicPicker into Picker
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.
2024-07-15 09:31:32 -04:00
..
commands Consolidate DynamicPicker into Picker 2024-07-15 09:31:32 -04:00
handlers Delay auto-save until exiting insert mode (#11047) 2024-06-29 11:08:21 +09:00
keymap feat(command): select_all_children 2024-04-09 10:33:15 -04:00
ui Consolidate DynamicPicker into Picker 2024-07-15 09:31:32 -04:00
application.rs Prevent improper files (like /dev/random) from being used as file arguments (#10733) 2024-06-18 18:14:17 +02:00
args.rs Fallback to filename for +arg (#9333) 2024-01-14 15:11:18 +01:00
commands.rs Add column configurations for existing pickers 2024-07-15 09:31:32 -04:00
compositor.rs add redraw command (#6949) 2023-09-08 10:46:36 +09:00
config.rs feat: smart_tab 2023-08-01 09:41:42 -05:00
events.rs Add hook/event system 2024-01-23 11:20:19 +09:00
handlers.rs Auto Save All Buffers After A Delay (#10899) 2024-06-11 00:39:06 +02:00
health.rs Add glob file type support (#8006) 2024-02-11 18:24:20 +01:00
job.rs Add hook/event system 2024-01-23 11:20:19 +09:00
keymap.rs Allow numbers as second input event (#8471) 2024-02-14 11:53:15 +01:00
lib.rs Ignore .svn version control files (#10536) 2024-04-21 12:00:30 +09:00
main.rs Add glob file type support (#8006) 2024-02-11 18:24:20 +01:00