Skip to main content

PickerSource

Enum PickerSource 

Source
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.

Fields

§prefilter: Option<String>
§

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.

Fields

§request_id: u32
§server_id: String
§

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.

Fields

§prefilter: Option<String>

Implementations§

Source§

impl PickerSource

Source

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

Source§

fn clone(&self) -> PickerSource

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PickerSource

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more