pub enum PickerSource {
Buffers,
LspInstances {
prefilter: Option<String>,
},
LspLocations,
Files,
LspShowMessageRequest {
request_id: u32,
server_id: String,
},
AiSessions {
prefilter: Option<String>,
},
}Expand description
Where a picker pulls its raw candidates from. The App resolves
this on populate / refresh and walks the appropriate source.
One enum variant per first-party source so the App stays
decoupled from generator implementations; plugin-provided
pickers will arrive as a separate Plugin(GeneratorId)
variant once the WASM host is online.
Variants§
Buffers
Walk every entry in BufferRegistry – the buffer
switcher (:b with no arg, future <C-x>b).
LspInstances
Walk the LSP supervisor’s running actor table, one
candidate per (workspace_root, server_id) pair, with
workspace path + buffer count + capability summary as
marginalia. Used by :lsp-log / :lsp-server-log /
:lsp-trace-log. The prefilter carries an optional
server_id so :lsp-log rust shows only rust-* rows;
the picker still appears so the user can disambiguate
when multiple workspaces have a rust server.
LspLocations
Static location list – multi-result LSP navigation
(gd / gD / gy / gI), gr references, and the
:diagnostics workspace list. Each row encodes one
file:line:col target; the typed
RoutingPayload::LspLocation carries (path, line, col) to the accept dispatch. Display is
<rel-path>:<line>:<col> <line preview> so the user
sees a ripgrep-style row.
Files
Workspace file walk – :files and :recent. Each row
is one filesystem path; accept hands it to
App::do_edit. Caller seeds the candidate list (the
picker stays renderer-agnostic).
LspShowMessageRequest
Server-initiated window/showMessageRequest. Each row
is one MessageActionItem title from the request’s
actions vec. request_id keys into the App’s pending-
SMR map so the accept arm (and the dismiss path) can
locate the inbound oneshot and reply. server_id rides
for display + log breadcrumbs.
AiSessions
Walk the AI subsystem’s known agent sessions, one
candidate per SessionKey (provider + per-provider
index). Used by :ai-log. Mirrors Self::LspInstances
one level simpler — the prefilter carries an optional
provider name so :ai-log opencode shows only opencode
rows; the picker still appears so the user can
disambiguate when multiple indices exist for a provider.
Implementations§
Source§impl PickerSource
impl PickerSource
Sourcepub fn help_topic(&self) -> Option<&'static str>
pub fn help_topic(&self) -> Option<&'static str>
PH.1: the help page for a picker seated WITHOUT a registry id — the
peer of the picker-<id> convention for the imperative pickers, which
have no id to form it from.
Buffers without an id is :buffers / :b — the transient menu seats
on Buffers too, but do_picker_help answers transients before it
gets here — so it shares :picker buffers’ page. Files answers
None: only the trait path seats on it, and that path always carries
an id.
Trait Implementations§
Source§impl Clone for PickerSource
impl Clone for PickerSource
Source§fn clone(&self) -> PickerSource
fn clone(&self) -> PickerSource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more