Skip to content

Conversation

@lambdalisue
Copy link
Member

Tons of things are not implemented yet.

DisposableStack and AsyncDisposableStack are available on types but
actually not available yet.

denoland/deno#20821
We will use this module to handle custom events.
Custom events are used to communicate between producer (Vim events,
Async scheduler) and consumers (View components like picker).
We will use this module to layout popup windows for View.
We may add opportunities to customize the layout in the future.
We will use this spinner to indicate that the collections or processions
are in progress.
We would not like to render all collected items in a selector window
thus we need to calculate the scroll offset to render by ourselves.
We need to observe Vim's prompt to know when the user is typing something.
Additionally, we need to safely open and close the prompt and notice
that user has canceled the prompt.
While cmap doesn't have namespace like feature, we need to store/restore
current cmap to avoid conflicts with other plugins.

Additionally, we need to provides a way to customize key mappings for
users so we emit User custom events when entering/leaving the picker.
We will use these components to render UI content in the constructed layout.

Components responsibility is to render the UI content to the buffer or window
so these only expose setters but getters for its internal state.

Components check if the internal state is changed from previous render and does
nothing if nothing had changed. Additionally, the `render` method returns `true`
if the component is actually rendered so that caller can know if `redraw` is needed.
Extensions are defined in https://github.com/vim-fall/deno-fall-core
This `extension` module is responsible for loading extensions from
1) builtin, 2) github, and 3) arbitrary URL.

We may add more resolvers in the future for example `community:xxxxx`
to load extensions from the community repository (like catalog).
We will use `ItemCollector` to collect items from source stream in background.
The class will collect items from the given stream and store them in the internal state.
Additinally, it uses custom events to notify the progress of collecting items.
We will use `ItemProcessor` to process collected items in the background.
It processes items using the given processors and query and stores the processed items
in internal state.
It also dispatches events when the processing is succeeded, failed, or completed.
@lambdalisue lambdalisue merged commit 2608e1c into main Mar 7, 2024
@lambdalisue lambdalisue deleted the v1 branch March 7, 2024 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants