Skip to main content

Crate lattice_plugin_manager

Crate lattice_plugin_manager 

Source
Expand description

The buffer-backed :plugins manager view: plugins-mode and the :plugins ex-command (PL8.H.2).

A pure PROVIDER crate (the oil / lattice-dashboard shape): it owns plugins-mode (major, read-only) and the :plugins ex-command, and reads the loader’s plugin_status() (PL8.H.1) via the PluginLoaderHandle service at activation. Everything wires through the generic SubsystemBoot seam, so adding it to the editor is one line in the host’s Phase-B install list and zero host internals — no Editor:: method, no host Action variant (the mode-ownership acid test).

Open flow, all generic primitives (no provider-specific host code):

  1. :plugins (registered here) returns Effect::OpenSyntheticBuffer { name: "*plugins*", mode_id: "plugins-mode" }.
  2. The host generically ensures that buffer under plugins-mode + activates it (Editor::open_synthetic_buffer).
  3. PluginManagerMode::on_activate projects the status table into the buffer and subscribes to PluginCrashed for live health.

Interactivity (reload / unload / describe chords) is PL8.H.3.

Structs§

PluginManagerMode
The *plugins* buffer’s major mode.

Constants§

PLUGINS_BUFFER_NAME
The synthetic buffer’s user-facing name and the major mode that owns it.
PLUGINS_MODE_ID

Functions§

install
Install the plugin-manager view: register plugins-mode + the :plugins ex-command. Seated in the host’s Phase-B install list (before the registry freeze), so it registers directly via boot.modes_mut() / boot.commands_mut().
render_status
Render the whole *plugins* buffer text from the current status snapshot. Column widths adapt to the content (name + tier), so the table stays aligned whether one plugin is loaded or fifty. The empty state is an explicit line, not a bare header.
render_status_with_failures
WT.4: render_status plus a trailing section for plugins that tried to load and could not.