Skip to main content

open_plugin_view

Function open_plugin_view 

Source
pub fn open_plugin_view(
    activator: &mut dyn ModeActivator,
    spec: &PluginViewSpec,
    last_view: Option<BufferId>,
) -> ProviderViewOutcome
Expand description

Create (or reuse) the view’s buffer and hand back its id — the SYNCHRONOUS half.

ProviderViewOpener is a sync closure, and build is an async guest call that may read files. Blocking the opener on it would put a plugin’s file reads on the dispatch path, which paramount #1 forbids outright. So this half seats an empty view with an in-progress headerline and returns immediately; fill_plugin_view applies the guest’s result when it lands. That is providers/agenda.rs’s shape (open_agenda + spawn_scan_view_scan) and it is the same reason.