Skip to main content

PluginCommand

Enum PluginCommand 

Source
pub enum PluginCommand {
Show 176 variants InsertText { buffer_id: BufferId, position: usize, text: String, }, DeleteRange { buffer_id: BufferId, range: Range<usize>, }, AddOverlay { buffer_id: BufferId, namespace: Option<OverlayNamespace>, range: Range<usize>, options: OverlayOptions, }, RemoveOverlay { buffer_id: BufferId, handle: OverlayHandle, }, SetStatus { message: String, }, ApplyTheme { theme_name: String, }, OverrideThemeColors { overrides: HashMap<String, [u8; 3]>, }, ReloadConfig, SetSetting { plugin_name: String, path: String, value: Value, }, AddPluginConfigField { plugin_name: String, field_name: String, field_schema: Value, }, RegisterCommand { command: Command, }, RegisterStatusBarElement { plugin_name: String, token_name: String, title: String, }, SetStatusBarValue { buffer_id: u64, key: String, value: String, }, UnregisterCommand { name: String, }, CreateWindow { root: PathBuf, label: String, }, SetActiveWindow { id: WindowId, }, CloseWindow { id: WindowId, }, PrewarmWindow { id: WindowId, }, WatchPath { path: PathBuf, recursive: bool, request_id: u64, }, UnwatchPath { handle: u64, }, PreviewWindowInRect { id: Option<WindowId>, }, OpenFileInBackground { path: PathBuf, window_id: Option<WindowId>, }, InsertAtCursor { text: String, }, SpawnProcess { command: String, args: Vec<String>, cwd: Option<String>, stdout_to: Option<PathBuf>, callback_id: JsCallbackId, }, Delay { callback_id: JsCallbackId, duration_ms: u64, }, SpawnBackgroundProcess { process_id: u64, command: String, args: Vec<String>, cwd: Option<String>, callback_id: JsCallbackId, }, KillBackgroundProcess { process_id: u64, }, SpawnProcessWait { process_id: u64, callback_id: JsCallbackId, }, SetLayoutHints { buffer_id: BufferId, split_id: Option<SplitId>, range: Range<usize>, hints: LayoutHints, }, SetLineNumbers { buffer_id: BufferId, enabled: bool, }, SetViewMode { buffer_id: BufferId, mode: String, }, SetLineWrap { buffer_id: BufferId, split_id: Option<SplitId>, enabled: bool, }, SubmitViewTransform { buffer_id: BufferId, split_id: Option<SplitId>, payload: ViewTransformPayload, }, ClearViewTransform { buffer_id: BufferId, split_id: Option<SplitId>, }, SetViewState { buffer_id: BufferId, key: String, value: Option<Value>, }, SetGlobalState { plugin_name: String, key: String, value: Option<Value>, }, SetWindowState { plugin_name: String, key: String, value: Option<Value>, }, ClearAllOverlays { buffer_id: BufferId, }, ClearNamespace { buffer_id: BufferId, namespace: OverlayNamespace, }, ClearOverlaysInRange { buffer_id: BufferId, start: usize, end: usize, }, AddVirtualText { buffer_id: BufferId, virtual_text_id: String, position: usize, text: String, color: (u8, u8, u8), use_bg: bool, before: bool, }, AddVirtualTextStyled { buffer_id: BufferId, virtual_text_id: String, position: usize, text: String, fg: Option<OverlayColorSpec>, bg: Option<OverlayColorSpec>, bold: bool, italic: bool, before: bool, }, RemoveVirtualText { buffer_id: BufferId, virtual_text_id: String, }, RemoveVirtualTextsByPrefix { buffer_id: BufferId, prefix: String, }, ClearVirtualTexts { buffer_id: BufferId, }, AddVirtualLine { buffer_id: BufferId, position: usize, text: String, fg_color: Option<OverlayColorSpec>, bg_color: Option<OverlayColorSpec>, above: bool, namespace: String, priority: i32, gutter_glyph: Option<String>, gutter_color: Option<OverlayColorSpec>, text_overlays: Vec<VirtualLineTextOverlay>, }, ClearVirtualTextNamespace { buffer_id: BufferId, namespace: String, }, AddConceal { buffer_id: BufferId, namespace: OverlayNamespace, start: usize, end: usize, replacement: Option<String>, }, ClearConcealNamespace { buffer_id: BufferId, namespace: OverlayNamespace, }, ClearConcealsInRange { buffer_id: BufferId, start: usize, end: usize, }, AddFold { buffer_id: BufferId, start: usize, end: usize, placeholder: Option<String>, }, ClearFolds { buffer_id: BufferId, }, SetFoldingRanges { buffer_id: BufferId, ranges: Vec<FoldingRange>, }, AddSoftBreak { buffer_id: BufferId, namespace: OverlayNamespace, position: usize, indent: u16, }, ClearSoftBreakNamespace { buffer_id: BufferId, namespace: OverlayNamespace, }, ClearSoftBreaksInRange { buffer_id: BufferId, start: usize, end: usize, }, RefreshLines { buffer_id: BufferId, }, RefreshAllLines, HookCompleted { hook_name: String, }, SetLineIndicator { buffer_id: BufferId, line: usize, namespace: String, symbol: String, color: (u8, u8, u8), priority: i32, }, SetLineIndicators { buffer_id: BufferId, lines: Vec<usize>, namespace: String, symbol: String, color: (u8, u8, u8), priority: i32, }, ClearLineIndicators { buffer_id: BufferId, namespace: String, }, SetFileExplorerDecorations { namespace: String, decorations: Vec<FileExplorerDecoration>, }, ClearFileExplorerDecorations { namespace: String, }, OpenFileAtLocation { path: PathBuf, line: Option<usize>, column: Option<usize>, }, OpenFileInSplit { split_id: usize, path: PathBuf, line: Option<usize>, column: Option<usize>, }, StartPrompt { label: String, prompt_type: String, floating_overlay: bool, }, StartPromptWithInitial { label: String, prompt_type: String, initial_value: String, floating_overlay: bool, }, StartPromptAsync { label: String, initial_value: String, callback_id: JsCallbackId, }, AwaitNextKey { callback_id: JsCallbackId, }, SetKeyCaptureActive { active: bool, }, SetPromptSuggestions { suggestions: Vec<Suggestion>, }, SetPromptInputSync { sync: bool, }, SetPromptTitle { title: Vec<StyledText>, }, SetPromptFooter { footer: Vec<StyledText>, }, SetPromptSelectedIndex { index: u32, }, AddMenuItem { menu_label: String, item: MenuItem, position: MenuPosition, }, AddMenu { menu: Menu, position: MenuPosition, }, RemoveMenuItem { menu_label: String, item_label: String, }, RemoveMenu { menu_label: String, }, CreateVirtualBuffer { name: String, mode: String, read_only: bool, }, CreateVirtualBufferWithContent { name: String, mode: String, read_only: bool, entries: Vec<TextPropertyEntry>, show_line_numbers: bool, show_cursors: bool, editing_disabled: bool, hidden_from_tabs: bool, request_id: Option<u64>, }, CreateVirtualBufferInSplit {
Show 14 fields name: String, mode: String, read_only: bool, entries: Vec<TextPropertyEntry>, ratio: f32, direction: Option<String>, panel_id: Option<String>, show_line_numbers: bool, show_cursors: bool, editing_disabled: bool, line_wrap: Option<bool>, before: bool, role: Option<String>, request_id: Option<u64>,
}, SetVirtualBufferContent { buffer_id: BufferId, entries: Vec<TextPropertyEntry>, }, GetTextPropertiesAtCursor { buffer_id: BufferId, }, CreateBufferGroup { name: String, mode: String, layout_json: String, request_id: Option<u64>, }, SetPanelContent { group_id: usize, panel_name: String, entries: Vec<TextPropertyEntry>, }, CloseBufferGroup { group_id: usize, }, FocusPanel { group_id: usize, panel_name: String, }, DefineMode { name: String, bindings: Vec<(String, String)>, read_only: bool, allow_text_input: bool, inherit_normal_bindings: bool, plugin_name: Option<String>, }, ShowBuffer { buffer_id: BufferId, }, StartAnimationArea { id: u64, rect: AnimationRect, kind: PluginAnimationKind, }, StartAnimationVirtualBuffer { id: u64, buffer_id: BufferId, kind: PluginAnimationKind, }, CancelAnimation { id: u64, }, CreateVirtualBufferInExistingSplit { name: String, mode: String, read_only: bool, entries: Vec<TextPropertyEntry>, split_id: SplitId, show_line_numbers: bool, show_cursors: bool, editing_disabled: bool, line_wrap: Option<bool>, request_id: Option<u64>, }, CloseBuffer { buffer_id: BufferId, }, CloseOtherBuffersInSplit { buffer_id: BufferId, split_id: SplitId, }, CloseAllBuffersInSplit { split_id: SplitId, }, CloseBuffersToRightInSplit { buffer_id: BufferId, split_id: SplitId, }, CloseBuffersToLeftInSplit { buffer_id: BufferId, split_id: SplitId, }, MoveTabLeft, MoveTabRight, CreateCompositeBuffer { name: String, mode: String, layout: CompositeLayoutConfig, sources: Vec<CompositeSourceConfig>, hunks: Option<Vec<CompositeHunk>>, initial_focus_hunk: Option<usize>, request_id: Option<u64>, }, UpdateCompositeAlignment { buffer_id: BufferId, hunks: Vec<CompositeHunk>, }, CloseCompositeBuffer { buffer_id: BufferId, }, FlushLayout, CompositeNextHunk { buffer_id: BufferId, }, CompositePrevHunk { buffer_id: BufferId, }, FocusSplit { split_id: SplitId, }, SetSplitBuffer { split_id: SplitId, buffer_id: BufferId, }, SetSplitScroll { split_id: SplitId, top_byte: usize, }, RequestHighlights { buffer_id: BufferId, range: Range<usize>, request_id: u64, }, CloseSplit { split_id: SplitId, }, SetSplitRatio { split_id: SplitId, ratio: f32, }, SetSplitLabel { split_id: SplitId, label: String, }, ClearSplitLabel { split_id: SplitId, }, GetSplitByLabel { label: String, request_id: u64, }, DistributeSplitsEvenly { split_ids: Vec<SplitId>, }, SetBufferCursor { buffer_id: BufferId, position: usize, }, SetBufferShowCursors { buffer_id: BufferId, show: bool, }, SendLspRequest { language: String, method: String, params: Option<Value>, request_id: u64, }, SetClipboard { text: String, }, DeleteSelection, SetContext { name: String, active: bool, }, SetReviewDiffHunks { hunks: Vec<ReviewHunk>, }, ExecuteAction { action_name: String, }, ExecuteActions { actions: Vec<ActionSpec>, }, GetBufferText { buffer_id: BufferId, start: usize, end: usize, request_id: u64, }, GetLineStartPosition { buffer_id: BufferId, line: u32, request_id: u64, }, GetLineEndPosition { buffer_id: BufferId, line: u32, request_id: u64, }, GetBufferLineCount { buffer_id: BufferId, request_id: u64, }, OpenFileStreaming { path: PathBuf, request_id: u64, }, RefreshBufferFromDisk { buffer_id: BufferId, request_id: u64, }, SetBufferGroupPanelBuffer { group_id: usize, panel_name: String, buffer_id: BufferId, request_id: u64, }, ScrollToLineCenter { split_id: SplitId, buffer_id: BufferId, line: usize, }, ScrollBufferToLine { buffer_id: BufferId, line: usize, }, SetEditorMode { mode: Option<String>, }, ShowActionPopup { popup_id: String, title: String, message: String, actions: Vec<ActionPopupAction>, }, SetLspMenuContributions { plugin_id: String, language: String, items: Vec<LspMenuItem>, }, DisableLspForLanguage { language: String, }, RestartLspForLanguage { language: String, }, SetLspRootUri { language: String, uri: String, }, CreateScrollSyncGroup { group_id: u32, left_split: SplitId, right_split: SplitId, }, SetScrollSyncAnchors { group_id: u32, anchors: Vec<(usize, usize)>, }, RemoveScrollSyncGroup { group_id: u32, }, SaveBufferToPath { buffer_id: BufferId, path: PathBuf, }, LoadPlugin { path: PathBuf, callback_id: JsCallbackId, }, UnloadPlugin { name: String, callback_id: JsCallbackId, }, ReloadPlugin { name: String, callback_id: JsCallbackId, }, ListPlugins { callback_id: JsCallbackId, }, ReloadThemes { apply_theme: Option<String>, }, RegisterGrammar { language: String, grammar_path: String, extensions: Vec<String>, }, RegisterLanguageConfig { language: String, config: LanguagePackConfig, }, RegisterLspServer { language: String, config: LspServerPackConfig, }, ReloadGrammars { callback_id: JsCallbackId, }, CreateTerminal { cwd: Option<String>, direction: Option<String>, ratio: Option<f32>, focus: Option<bool>, persistent: bool, window_id: Option<WindowId>, command: Option<Vec<String>>, title: Option<String>, request_id: u64, }, SendTerminalInput { terminal_id: TerminalId, data: String, }, CloseTerminal { terminal_id: TerminalId, }, SignalWindow { id: WindowId, signal: String, }, GrepProject { pattern: String, fixed_string: bool, case_sensitive: bool, max_results: usize, whole_words: bool, callback_id: JsCallbackId, }, BeginSearch { pattern: String, fixed_string: bool, case_sensitive: bool, max_results: usize, whole_words: bool, handle_id: u64, }, ReplaceInBuffer { file_path: PathBuf, matches: Vec<(usize, usize)>, replacement: String, callback_id: JsCallbackId, }, SetAuthority { payload: Value, }, ClearAuthority, SetRemoteIndicatorState { state: Value, }, ClearRemoteIndicatorState, SpawnHostProcess { command: String, args: Vec<String>, cwd: Option<String>, callback_id: JsCallbackId, }, KillHostProcess { process_id: u64, }, MountWidgetPanel { panel_id: u64, buffer_id: BufferId, spec: WidgetSpec, }, UpdateWidgetPanel { panel_id: u64, spec: WidgetSpec, }, UnmountWidgetPanel { panel_id: u64, }, WidgetCommand { panel_id: u64, action: WidgetAction, }, WidgetMutate { panel_id: u64, mutation: WidgetMutation, }, MountFloatingWidget { panel_id: u64, spec: WidgetSpec, width_pct: u8, height_pct: u8, }, UpdateFloatingWidget { panel_id: u64, spec: WidgetSpec, }, UnmountFloatingWidget { panel_id: u64, },
}
Expand description

Plugin command - allows plugins to send commands to the editor

Variants§

§

InsertText

Insert text at a position in a buffer

Fields

§buffer_id: BufferId
§position: usize
§text: String
§

DeleteRange

Delete a range of text from a buffer

Fields

§buffer_id: BufferId
§range: Range<usize>
§

AddOverlay

Add an overlay to a buffer, returns handle via response channel

Colors can be specified as RGB tuples or theme keys. When theme keys are provided, they take precedence and are resolved at render time.

Fields

§buffer_id: BufferId
§range: Range<usize>
§options: OverlayOptions

Overlay styling options (colors, modifiers, etc.)

§

RemoveOverlay

Remove an overlay by its opaque handle

Fields

§buffer_id: BufferId
§

SetStatus

Set status message

Fields

§message: String
§

ApplyTheme

Apply a theme by name

Fields

§theme_name: String
§

OverrideThemeColors

Override specific theme color keys in-memory for the running session. Keys are the same section.field strings accepted by Theme::resolve_theme_key (e.g. "editor.bg", "ui.status_bar_fg"). Values are [r, g, b] triplets. Unknown keys are silently dropped so a typo in a fast animation loop doesn’t blow up the caller; the return channel isn’t used — plugins can do a dry-run look-up via getThemeSchema if they want compile-time safety. Overrides are reset the next time the caller (or anyone else) invokes applyTheme, because that replaces the whole Theme from the registry.

Fields

§overrides: HashMap<String, [u8; 3]>
§

ReloadConfig

Reload configuration from file After a plugin saves config changes, it should call this to reload the config

§

SetSetting

Write a single setting to the runtime overlay for this session. path is dot-separated (e.g. “editor.tab_size”). Last write wins.

Fields

§plugin_name: String
§path: String
§value: Value
§

AddPluginConfigField

Register one field of a plugin-defined config schema. Each field arrives independently (one per defineConfigBoolean / Integer / etc. call from the plugin’s TypeScript). The host accumulates fields into plugins.<plugin_name> schema and pre-populates the declared default into plugins.<plugin_name>.settings.<field>.

Fields

§plugin_name: String
§field_name: String
§field_schema: Value

JSON Schema fragment for this single field (e.g. {"type":"boolean","default":false,"description":"..."}).

§

RegisterCommand

Register a custom command

Fields

§command: Command
§

RegisterStatusBarElement

Register a custom statusbar token

Fields

§plugin_name: String
§token_name: String
§title: String
§

SetStatusBarValue

Set the value of a status-bar token for a specific buffer. key is the full “plugin_name:token_name” form.

Fields

§buffer_id: u64
§value: String
§

UnregisterCommand

Unregister a command by name

Fields

§name: String
§

CreateWindow

Create a new editor session rooted at root.

root must be an absolute path; relative paths are rejected rather than silently joined onto the active session’s root — that ambiguity would leak the wrong cwd into agent processes. label may be empty; the editor falls back to the basename of root (matching Session::new).

The new session’s id is assigned by the editor and reported back via the session_created plugin hook (id, label, root in payload). Sessions are not made active on creation; follow up with SetActiveWindow to dive.

Fields

§root: PathBuf
§label: String
§

SetActiveWindow

Make id the active session. No-op if id is already active. Fires active_session_changed on transition. Errors (id not found) are logged via tracing rather than surfaced to the plugin — the plugin can verify by reading editor.activeWindow() after.

Fields

§

CloseWindow

Close a session and drop its associated state. Refuses to close the currently active session — the caller must switch first. Fires session_closed on success.

Fields

§

PrewarmWindow

Eagerly initialise an inactive session’s per-session state (file tree walk, ignore matcher, etc.) without diving. The only thing that’s actually pre-warmed today is the file explorer’s root walk; LSP servers boot on first buffer open and watcher setup happens on first watchPath call, so those are unaffected. No-op for the active session (already warm) or unknown id.

Fields

§

WatchPath

Register a filesystem path watcher. The editor returns the allocated handle via the async response so the plugin can match path_changed events back to the call. recursive follows notify::RecursiveMode; non-recursive watches cover only the named path itself (or its direct children for directories on macOS — kqueue limitation).

Fields

§path: PathBuf
§recursive: bool
§request_id: u64
§

UnwatchPath

Drop a path watcher previously registered via WatchPath. Unknown handles are silently ignored — the editor’s view of “what’s still watched” can drift if a plugin reloads, and the design doesn’t make plugins reconcile.

Fields

§handle: u64
§

PreviewWindowInRect

Tell the editor that the floating-overlay prompt’s preview pane should render the entire split tree of session id (Primitive #1 in docs/internal/orchestrator-sessions-design.md). None clears the override and falls back to the existing path-based phantom-leaf preview.

Orchestrator sets this when the user navigates the session list so the right-hand pane shows the highlighted session’s full editor UI live (splits, terminals, syntax highlighting, decorations) — rendered natively by reusing the editor’s existing render_content path against the previewed session’s stashed split tree.

Fields

§

OpenFileInBackground

Open a file in the editor (in background, without switching focus).

window_id defaults to the active session at dispatch time. When set to an inactive session, the file’s buffer is loaded as usual but attached to that session’s membership and split tree — the active session’s UI is undisturbed.

Fields

§path: PathBuf
§window_id: Option<WindowId>
§

InsertAtCursor

Insert text at the current cursor position in the active buffer

Fields

§text: String
§

SpawnProcess

Spawn an async process

When stdout_to is Some(path), the child’s stdout is piped directly into that file on disk (via tokio::io::copy) rather than being buffered in memory. The resulting SpawnResult.stdout is empty in that case; stderr and exit_code are populated as usual. This lets large outputs (e.g. git show for a big commit) stay on disk and be opened as a file-backed buffer without ever crossing the JS bridge.

Fields

§command: String
§args: Vec<String>
§stdout_to: Option<PathBuf>
§callback_id: JsCallbackId
§

Delay

Delay/sleep for a duration (async, resolves callback when done)

Fields

§callback_id: JsCallbackId
§duration_ms: u64
§

SpawnBackgroundProcess

Spawn a long-running background process Unlike SpawnProcess, this returns immediately with a process handle and provides streaming output via hooks

Fields

§process_id: u64

Unique ID for this process (generated by plugin runtime)

§command: String

Command to execute

§args: Vec<String>

Arguments to pass

§cwd: Option<String>

Working directory (optional)

§callback_id: JsCallbackId

Callback ID to call when process exits

§

KillBackgroundProcess

Kill a background process by ID

Fields

§process_id: u64
§

SpawnProcessWait

Wait for a process to complete and get its result Used with processes started via SpawnProcess

Fields

§process_id: u64

Process ID to wait for

§callback_id: JsCallbackId

Callback ID for async response

§

SetLayoutHints

Set layout hints for a buffer/viewport

Fields

§buffer_id: BufferId
§split_id: Option<SplitId>
§range: Range<usize>
§

SetLineNumbers

Enable/disable line numbers for a buffer

Fields

§buffer_id: BufferId
§enabled: bool
§

SetViewMode

Set the view mode for a buffer (“source” or “compose”)

Fields

§buffer_id: BufferId
§mode: String
§

SetLineWrap

Enable/disable line wrapping for a buffer

Fields

§buffer_id: BufferId
§split_id: Option<SplitId>
§enabled: bool
§

SubmitViewTransform

Submit a transformed view stream for a viewport

Fields

§buffer_id: BufferId
§split_id: Option<SplitId>
§

ClearViewTransform

Clear view transform for a buffer/split (returns to normal rendering)

Fields

§buffer_id: BufferId
§split_id: Option<SplitId>
§

SetViewState

Set plugin-managed view state for a buffer in the active split. Stored in BufferViewState.plugin_state and persisted across sessions.

Fields

§buffer_id: BufferId
§value: Option<Value>
§

SetGlobalState

Set plugin-managed global state (not tied to any buffer or split). Isolated per plugin by plugin_name. TODO: Need to think about plugin isolation / namespacing strategy for these APIs.

Fields

§plugin_name: String
§value: Option<Value>
§

SetWindowState

Plugin-managed per-session state. Writes to the currently active session’s plugin_state map keyed by (plugin_name, key). Other sessions’ state is unaffected. None means delete (matches SetGlobalState semantics).

Fields

§plugin_name: String
§value: Option<Value>
§

ClearAllOverlays

Remove all overlays from a buffer

Fields

§buffer_id: BufferId
§

ClearNamespace

Remove all overlays in a namespace

Fields

§buffer_id: BufferId
§

ClearOverlaysInRange

Remove all overlays that overlap with a byte range Used for targeted invalidation when content in a range changes

Fields

§buffer_id: BufferId
§start: usize
§end: usize
§

AddVirtualText

Add virtual text (inline text that doesn’t exist in the buffer) Used for color swatches, type hints, parameter hints, etc.

Fields

§buffer_id: BufferId
§virtual_text_id: String
§position: usize
§text: String
§color: (u8, u8, u8)
§use_bg: bool
§before: bool
§

AddVirtualTextStyled

Add virtual text with full styling — fg/bg can be RGB or theme keys (resolved at render time so theme changes apply live). This is the richer form of AddVirtualText that lets plugins produce themed labels (flash jump, type hints with semantic colours, …) without hard-coding RGB values.

Fields

§buffer_id: BufferId
§virtual_text_id: String
§position: usize
§text: String
§bold: bool
§italic: bool
§before: bool
§

RemoveVirtualText

Remove a virtual text by ID

Fields

§buffer_id: BufferId
§virtual_text_id: String
§

RemoveVirtualTextsByPrefix

Remove virtual texts whose ID starts with the given prefix

Fields

§buffer_id: BufferId
§prefix: String
§

ClearVirtualTexts

Clear all virtual texts from a buffer

Fields

§buffer_id: BufferId
§

AddVirtualLine

Add a virtual LINE (full line above/below a position) Used for git blame headers, code coverage, inline documentation, etc. These lines do NOT show line numbers in the gutter.

Fields

§buffer_id: BufferId
§position: usize

Byte position to anchor the line to

§text: String

Full line content to display

§fg_color: Option<OverlayColorSpec>

Foreground color — RGB tuple or theme key string (e.g. "editor.line_number_fg"). Resolved at render time so the line follows theme changes.

§bg_color: Option<OverlayColorSpec>

Background color — RGB tuple or theme key string. None = transparent (inherits from underlying viewport background).

§above: bool

true = above the line containing position, false = below

§namespace: String

Namespace for bulk removal (e.g., “git-blame”)

§priority: i32

Priority for ordering multiple lines at same position (higher = later)

§gutter_glyph: Option<String>

Optional gutter glyph rendered in the line-number column on the first visual row of this virtual line. Used by diff plugins to put a “-” directly on the deletion line itself instead of the source line that follows it.

§gutter_color: Option<OverlayColorSpec>

Color for gutter_glyph (RGB or theme key). Falls back to theme.line_number_fg when None.

§text_overlays: Vec<VirtualLineTextOverlay>

Per-range modifier overlays applied on top of the base fg/bg. Offsets are byte offsets within text, not buffer bytes. Used e.g. by live-diff to bold + underline removed words on a deletion virtual line.

§

ClearVirtualTextNamespace

Clear all virtual texts in a namespace This is the primary way to remove a plugin’s virtual lines before updating them.

Fields

§buffer_id: BufferId
§namespace: String
§

AddConceal

Add a conceal range that hides or replaces a byte range during rendering. Used for Typora-style seamless markdown: hiding syntax markers like **, [](url), etc.

Fields

§buffer_id: BufferId
§namespace: OverlayNamespace

Namespace for bulk removal (shared with overlay namespace system)

§start: usize

Byte range to conceal

§end: usize
§replacement: Option<String>

Optional replacement text to show instead. None = hide completely.

§

ClearConcealNamespace

Clear all conceal ranges in a namespace

Fields

§buffer_id: BufferId
§

ClearConcealsInRange

Remove all conceal ranges that overlap with a byte range Used for targeted invalidation when content in a range changes

Fields

§buffer_id: BufferId
§start: usize
§end: usize
§

AddFold

Add a collapsed fold range. Hides the byte range [start, end) from rendering — the line containing start - 1 (the fold’s “header”) stays visible while the lines covered by the range are skipped. Used by plugins that want to expose outline-style collapse without rebuilding buffer content.

Fields

§buffer_id: BufferId
§start: usize
§end: usize
§placeholder: Option<String>

Optional placeholder text to show on the header line (currently unused by the renderer; reserved for future use).

§

ClearFolds

Clear every collapsed fold range on the buffer.

Fields

§buffer_id: BufferId
§

SetFoldingRanges

Publish a set of fold ranges on the buffer in the same shape LSP textDocument/foldingRange populates. The ranges are stored as toggleable — the standard toggle_fold keybinding finds them via state.folding_ranges and collapses/expands on demand. Unlike AddFold, this does not pre-collapse anything.

Designed for plugins that derive structural folds from buffer content (e.g. git-log’s per-file / per-hunk diff structure) without driving an LSP. Replacing call replaces the prior set.

Fields

§buffer_id: BufferId
§

AddSoftBreak

Add a soft break point for marker-based line wrapping. The break is stored as a marker that auto-adjusts on buffer edits, eliminating the flicker caused by async view_transform round-trips.

Fields

§buffer_id: BufferId
§namespace: OverlayNamespace

Namespace for bulk removal (shared with overlay namespace system)

§position: usize

Byte offset where the break should be injected

§indent: u16

Number of hanging indent spaces after the break

§

ClearSoftBreakNamespace

Clear all soft breaks in a namespace

Fields

§buffer_id: BufferId
§

ClearSoftBreaksInRange

Remove all soft breaks that fall within a byte range

Fields

§buffer_id: BufferId
§start: usize
§end: usize
§

RefreshLines

Refresh lines for a buffer (clear seen_lines cache to re-trigger lines_changed hook)

Fields

§buffer_id: BufferId
§

RefreshAllLines

Refresh lines for ALL buffers (clear entire seen_lines cache) Sent when a plugin registers for the lines_changed hook to handle the race where render marks lines as “seen” before the plugin has registered.

§

HookCompleted

Sentinel sent by the plugin thread after a hook has been fully processed. Used by the render loop to wait deterministically for plugin responses (e.g., conceal commands from lines_changed) instead of polling.

Fields

§hook_name: String
§

SetLineIndicator

Set a line indicator in the gutter’s indicator column Used for git gutter, breakpoints, bookmarks, etc.

Fields

§buffer_id: BufferId
§line: usize

Line number (0-indexed)

§namespace: String

Namespace for grouping (e.g., “git-gutter”, “breakpoints”)

§symbol: String

Symbol to display (e.g., “│”, “●”, “★”)

§color: (u8, u8, u8)

Color as RGB tuple

§priority: i32

Priority for display when multiple indicators exist (higher wins)

§

SetLineIndicators

Batch set line indicators in the gutter’s indicator column Optimized for setting many lines with the same namespace/symbol/color/priority

Fields

§buffer_id: BufferId
§lines: Vec<usize>

Line numbers (0-indexed)

§namespace: String

Namespace for grouping (e.g., “git-gutter”, “breakpoints”)

§symbol: String

Symbol to display (e.g., “│”, “●”, “★”)

§color: (u8, u8, u8)

Color as RGB tuple

§priority: i32

Priority for display when multiple indicators exist (higher wins)

§

ClearLineIndicators

Clear all line indicators for a specific namespace

Fields

§buffer_id: BufferId
§namespace: String

Namespace to clear (e.g., “git-gutter”)

§

SetFileExplorerDecorations

Set file explorer decorations for a namespace

Fields

§namespace: String

Namespace for grouping (e.g., “git-status”)

§decorations: Vec<FileExplorerDecoration>

Decorations to apply

§

ClearFileExplorerDecorations

Clear file explorer decorations for a namespace

Fields

§namespace: String

Namespace to clear (e.g., “git-status”)

§

OpenFileAtLocation

Open a file at a specific line and column Line and column are 1-indexed to match git grep output

Fields

§path: PathBuf
§column: Option<usize>
§

OpenFileInSplit

Open a file in a specific split at a given line and column Line and column are 1-indexed to match git grep output

Fields

§split_id: usize
§path: PathBuf
§column: Option<usize>
§

StartPrompt

Start a prompt (minibuffer) with a custom type identifier This allows plugins to create interactive prompts

Fields

§label: String
§prompt_type: String
§floating_overlay: bool

When true, the prompt renders as a centred floating overlay rather than a bottom-row minibuffer. Used for Live Grep (issue #1796). Defaults to false at the wire level via #[serde(default)].

§

StartPromptWithInitial

Start a prompt with pre-filled initial value

Fields

§label: String
§prompt_type: String
§initial_value: String
§floating_overlay: bool

See StartPrompt::floating_overlay.

§

StartPromptAsync

Start an async prompt that returns result via callback The callback_id is used to resolve the promise when the prompt is confirmed or cancelled

Fields

§label: String
§initial_value: String
§callback_id: JsCallbackId
§

AwaitNextKey

Request the next keypress for the calling plugin.

The editor enqueues callback_id and resolves it with a KeyEventPayload JSON value the next time a key arrives in Editor::handle_key. Multiple pending requests are FIFO. While at least one request is pending, the next key is consumed by the resolution and does not propagate to mode bindings or other dispatch — this is the primitive that lets a plugin run a short input loop (flash labels, vi find-char, replace-char, etc.) without binding every printable key in defineMode.

Fields

§callback_id: JsCallbackId
§

SetKeyCaptureActive

Begin or end “key capture” mode for the calling plugin.

Without this, a plugin running a getNextKey() loop has a race: keys typed by the user (or pasted, or auto-repeated) can arrive between two consecutive getNextKey() calls while the plugin is still mid-redraw, and would otherwise fall through to the editor’s normal dispatch (inserting into the buffer, etc.).

While capture is active, every key arriving in Editor::handle_key (after terminal-input dispatch) is either resolved against a pending AwaitNextKey callback (existing behaviour) or, if no callback is pending, buffered in a FIFO queue. When the next AwaitNextKey is processed, the queue is drained first. This gives plugins lossless, in-order delivery of every key the user typed regardless of timing.

EndKeyCapture clears any unconsumed buffered keys; they do NOT replay into the editor’s normal dispatch path (that would be surprising — the user’s intent was for the plugin to consume them).

Fields

§active: bool
§

SetPromptSuggestions

Update the suggestions list for the current prompt Uses the editor’s Suggestion type

Fields

§suggestions: Vec<Suggestion>
§

SetPromptInputSync

When enabled, navigating suggestions updates the prompt input text

Fields

§sync: bool
§

SetPromptTitle

Set the title shown in a floating-overlay prompt’s frame header (issue #1796) as styled segments. Each segment carries optional OverlayOptions, so plugins can theme keybinding hints with fg: "ui.help_key_fg", separators with fg: "ui.popup_border_fg", etc. An empty vec clears the title and falls back to the prompt-type default. Has no visible effect on non-overlay prompts.

Fields

§

SetPromptFooter

Plugin-supplied footer chrome rendered along the bottom row of the floating-overlay’s results pane (Primitive #2 chrome region in docs/internal/orchestrator-sessions-design.md). Orchestrator uses this for hotkey-hint rows. Empty vec clears the footer. Has no visible effect on non-overlay prompts.

Fields

§footer: Vec<StyledText>
§

SetPromptSelectedIndex

Override the currently-highlighted suggestion row in the open prompt. Clamped to the suggestion list’s bounds; out- of-range indices snap to the last row. No-op when there is no open prompt or the list is empty. The renderer scrolls the selection into view on the next frame.

Fields

§index: u32
§

AddMenuItem

Add a menu item to an existing menu Add a menu item to an existing menu

Fields

§menu_label: String
§position: MenuPosition
§

AddMenu

Add a new top-level menu

Fields

§menu: Menu
§position: MenuPosition
§

RemoveMenuItem

Remove a menu item from a menu

Fields

§menu_label: String
§item_label: String
§

RemoveMenu

Remove a top-level menu

Fields

§menu_label: String
§

CreateVirtualBuffer

Create a new virtual buffer (not backed by a file)

Fields

§name: String

Display name (e.g., “Diagnostics”)

§mode: String

Mode name for buffer-local keybindings (e.g., “diagnostics-list”)

§read_only: bool

Whether the buffer is read-only

§

CreateVirtualBufferWithContent

Create a virtual buffer and set its content in one operation This is preferred over CreateVirtualBuffer + SetVirtualBufferContent because it doesn’t require tracking the buffer ID

Fields

§name: String

Display name (e.g., “Diagnostics”)

§mode: String

Mode name for buffer-local keybindings (e.g., “diagnostics-list”)

§read_only: bool

Whether the buffer is read-only

§entries: Vec<TextPropertyEntry>

Entries with text and embedded properties

§show_line_numbers: bool

Whether to show line numbers in the gutter

§show_cursors: bool

Whether to show cursors in the buffer

§editing_disabled: bool

Whether editing is disabled (blocks editing commands)

§hidden_from_tabs: bool

Whether this buffer should be hidden from tabs (for composite source buffers)

§request_id: Option<u64>

Optional request ID for async response

§

CreateVirtualBufferInSplit

Create a virtual buffer in a horizontal split Opens the buffer in a new pane below the current one

Fields

§name: String

Display name (e.g., “Diagnostics”)

§mode: String

Mode name for buffer-local keybindings (e.g., “diagnostics-list”)

§read_only: bool

Whether the buffer is read-only

§entries: Vec<TextPropertyEntry>

Entries with text and embedded properties

§ratio: f32

Split ratio (0.0 to 1.0, where 0.5 = equal split)

§direction: Option<String>

Split direction (“horizontal” or “vertical”), default horizontal

§panel_id: Option<String>

Optional panel ID for idempotent operations (if panel exists, update content)

§show_line_numbers: bool

Whether to show line numbers in the buffer (default true)

§show_cursors: bool

Whether to show cursors in the buffer (default true)

§editing_disabled: bool

Whether editing is disabled for this buffer (default false)

§line_wrap: Option<bool>

Whether line wrapping is enabled for this split (None = use global setting)

§before: bool

Place the new buffer before (left/top of) the existing content (default: false/after)

§role: Option<String>

Optional split role tag. When Some("utility_dock"), the dispatcher routes the buffer to the existing dock leaf if one exists; otherwise it seeds a new dock leaf with the requested direction/ratio.

§request_id: Option<u64>

Optional request ID for async response (if set, editor will send back buffer ID)

§

SetVirtualBufferContent

Set the content of a virtual buffer with text properties

Fields

§buffer_id: BufferId
§entries: Vec<TextPropertyEntry>

Entries with text and embedded properties

§

GetTextPropertiesAtCursor

Get text properties at the cursor position in a buffer

Fields

§buffer_id: BufferId
§

CreateBufferGroup

Create a buffer group: multiple panels appearing as one tab. Each panel is a real buffer with its own scrollbar and viewport.

Fields

§name: String

Display name (shown in tab bar)

§mode: String

Mode for keybindings

§layout_json: String

Layout tree as JSON string (parsed by the handler)

§request_id: Option<u64>

Optional request ID for async response

§

SetPanelContent

Set the content of a panel within a buffer group.

Fields

§group_id: usize

Group ID

§panel_name: String

Panel name (e.g., “tree”, “picker”)

§entries: Vec<TextPropertyEntry>

Content entries

§

CloseBufferGroup

Close a buffer group (closes all panels and splits)

Fields

§group_id: usize
§

FocusPanel

Focus a specific panel within a buffer group

Fields

§group_id: usize
§panel_name: String
§

DefineMode

Define a buffer mode with keybindings

Fields

§name: String
§bindings: Vec<(String, String)>
§read_only: bool
§allow_text_input: bool

When true, unbound character keys dispatch as mode_text_input:<char>.

§inherit_normal_bindings: bool

When true, keys not bound by this mode fall through to the Normal context (motion, selection, copy) instead of being dropped.

§plugin_name: Option<String>

Name of the plugin that defined this mode (for attribution)

§

ShowBuffer

Switch the current split to display a buffer

Fields

§buffer_id: BufferId
§

StartAnimationArea

Start a frame-buffer animation over a given screen region. The id is allocated on the plugin side so the JS call can return it synchronously; the editor uses it verbatim.

§

StartAnimationVirtualBuffer

Start an animation over the on-screen Rect currently occupied by a virtual buffer. If the buffer is not visible, the editor ignores the command.

Fields

§id: u64
§buffer_id: BufferId
§

CancelAnimation

Cancel an animation by the ID returned from animateArea / animateVirtualBuffer. No-op if the ID is unknown or already done.

Fields

§id: u64
§

CreateVirtualBufferInExistingSplit

Create a virtual buffer in an existing split (replaces current buffer in that split)

Fields

§name: String

Display name (e.g., “Commit Details”)

§mode: String

Mode name for buffer-local keybindings

§read_only: bool

Whether the buffer is read-only

§entries: Vec<TextPropertyEntry>

Entries with text and embedded properties

§split_id: SplitId

Target split ID where the buffer should be displayed

§show_line_numbers: bool

Whether to show line numbers in the buffer (default true)

§show_cursors: bool

Whether to show cursors in the buffer (default true)

§editing_disabled: bool

Whether editing is disabled for this buffer (default false)

§line_wrap: Option<bool>

Whether line wrapping is enabled for this split (None = use global setting)

§request_id: Option<u64>

Optional request ID for async response

§

CloseBuffer

Close a buffer and remove it from all splits

Fields

§buffer_id: BufferId
§

CloseOtherBuffersInSplit

Close all buffers in the split except the specified one

Fields

§buffer_id: BufferId
§split_id: SplitId
§

CloseAllBuffersInSplit

Close all buffers in the split

Fields

§split_id: SplitId
§

CloseBuffersToRightInSplit

Close all buffers to the right of the specified buffer in the split

Fields

§buffer_id: BufferId
§split_id: SplitId
§

CloseBuffersToLeftInSplit

Close all buffers to the left of the specified buffer in the split

Fields

§buffer_id: BufferId
§split_id: SplitId
§

MoveTabLeft

Move the active tab one position to the left within its split

§

MoveTabRight

Move the active tab one position to the right within its split

§

CreateCompositeBuffer

Create a composite buffer that displays multiple source buffers Used for side-by-side diff, unified diff, and 3-way merge views

Fields

§name: String

Display name (shown in tab bar)

§mode: String

Mode name for keybindings (e.g., “diff-view”)

§layout: CompositeLayoutConfig

Layout configuration

§sources: Vec<CompositeSourceConfig>

Source pane configurations

§hunks: Option<Vec<CompositeHunk>>

Diff hunks for line alignment (optional)

§initial_focus_hunk: Option<usize>

When set, first render scrolls to center this hunk (0-indexed)

§request_id: Option<u64>

Request ID for async response

§

UpdateCompositeAlignment

Update alignment for a composite buffer (e.g., after source edit)

Fields

§buffer_id: BufferId
§

CloseCompositeBuffer

Close a composite buffer

Fields

§buffer_id: BufferId
§

FlushLayout

Force-materialize render-dependent state (like layoutIfNeeded in UIKit).

Creates CompositeViewState for any visible composite buffer that doesn’t have one, and syncs viewport dimensions from split layout. This ensures subsequent commands can read/modify view state that is normally created lazily during the render cycle.

§

CompositeNextHunk

Navigate to the next hunk in a composite buffer

Fields

§buffer_id: BufferId
§

CompositePrevHunk

Navigate to the previous hunk in a composite buffer

Fields

§buffer_id: BufferId
§

FocusSplit

Focus a specific split

Fields

§split_id: SplitId
§

SetSplitBuffer

Set the buffer displayed in a specific split

Fields

§split_id: SplitId
§buffer_id: BufferId
§

SetSplitScroll

Set the scroll position of a specific split

Fields

§split_id: SplitId
§top_byte: usize
§

RequestHighlights

Request syntax highlights for a buffer range

Fields

§buffer_id: BufferId
§range: Range<usize>
§request_id: u64
§

CloseSplit

Close a split (if not the last one)

Fields

§split_id: SplitId
§

SetSplitRatio

Set the ratio of a split container

Fields

§split_id: SplitId
§ratio: f32

Ratio between 0.0 and 1.0 (0.5 = equal split)

§

SetSplitLabel

Set a label on a leaf split (e.g., “sidebar”)

Fields

§split_id: SplitId
§label: String
§

ClearSplitLabel

Remove a label from a split

Fields

§split_id: SplitId
§

GetSplitByLabel

Find a split by its label (async)

Fields

§label: String
§request_id: u64
§

DistributeSplitsEvenly

Distribute splits evenly - make all given splits equal size

Fields

§split_ids: Vec<SplitId>

Split IDs to distribute evenly

§

SetBufferCursor

Set cursor position in a buffer (also scrolls viewport to show cursor)

Fields

§buffer_id: BufferId
§position: usize

Byte offset position for the cursor

§

SetBufferShowCursors

Toggle whether the editor draws a native caret for this buffer.

Buffer-group panel buffers default to show_cursors = false, which not only hides the caret but also blocks all movement actions in action_to_events. Plugins that want native cursor motion in a panel buffer (e.g. for magit-style row navigation) flip this to true after createBufferGroup returns.

Fields

§buffer_id: BufferId
§show: bool
§

SendLspRequest

Send an arbitrary LSP request and return the raw JSON response

Fields

§language: String
§method: String
§params: Option<Value>
§request_id: u64
§

SetClipboard

Set the internal clipboard content

Fields

§text: String
§

DeleteSelection

Delete the current selection in the active buffer This deletes all selected text across all cursors

§

SetContext

Set or unset a custom context Custom contexts are plugin-defined states that can be used to control command visibility For example, “config-editor” context could make config editor commands available

Fields

§name: String

Context name (e.g., “config-editor”)

§active: bool

Whether the context is active

§

SetReviewDiffHunks

Set the hunks for the Review Diff tool

Fields

§

ExecuteAction

Execute an editor action by name (e.g., “move_word_right”, “delete_line”) Used by vi mode plugin to run motions and calculate cursor ranges

Fields

§action_name: String

Action name (e.g., “move_word_right”, “move_line_end”)

§

ExecuteActions

Execute multiple actions in sequence, each with an optional repeat count Used by vi mode for count prefix (e.g., “3dw” = delete 3 words) All actions execute atomically with no plugin roundtrips between them

Fields

§actions: Vec<ActionSpec>

List of actions to execute in sequence

§

GetBufferText

Get text from a buffer range (for yank operations)

Fields

§buffer_id: BufferId

Buffer ID

§start: usize

Start byte offset

§end: usize

End byte offset

§request_id: u64

Request ID for async response

§

GetLineStartPosition

Get byte offset of the start of a line (async) Line is 0-indexed (0 = first line)

Fields

§buffer_id: BufferId

Buffer ID (0 for active buffer)

§line: u32

Line number (0-indexed)

§request_id: u64

Request ID for async response

§

GetLineEndPosition

Get byte offset of the end of a line (async) Line is 0-indexed (0 = first line) Returns the byte offset after the last character of the line (before newline)

Fields

§buffer_id: BufferId

Buffer ID (0 for active buffer)

§line: u32

Line number (0-indexed)

§request_id: u64

Request ID for async response

§

GetBufferLineCount

Get the total number of lines in a buffer (async)

Fields

§buffer_id: BufferId

Buffer ID (0 for active buffer)

§request_id: u64

Request ID for async response

§

OpenFileStreaming

Open path as a regular buffer in forced large-file (file-backed) mode regardless of file size. Designed for buffers whose backing file will grow under them (e.g. a temp file fed by spawnProcess with stdoutTo). Resolves with the new buffer’s id.

Pair with RefreshBufferFromDisk to grow the buffer as the file is written.

Fields

§path: PathBuf

Path to open. May not yet exist or may be empty.

§request_id: u64

Request ID for async response (the buffer_id).

§

RefreshBufferFromDisk

Re-stat the file backing buffer_id and extend the buffer if the file has grown. No-op if the buffer has no file path or the file didn’t grow. Resolves with the new total byte length.

Fields

§buffer_id: BufferId
§request_id: u64

Request ID for async response.

§

SetBufferGroupPanelBuffer

Re-point a buffer-group’s panel at a different buffer id. Used by streaming plugins (e.g. git-log) to swap one file-backed buffer for another when the user navigates to a new commit, without rebuilding the group layout. Both group.panel_buffers[panel_name] and the corresponding SplitViewState.active_buffer are updated; layout is marked dirty for the next render.

Resolves with true on success, false if the group or panel is missing.

Fields

§group_id: usize
§panel_name: String
§buffer_id: BufferId
§request_id: u64
§

ScrollToLineCenter

Scroll a split to center a specific line in the viewport Line is 0-indexed (0 = first line)

Fields

§split_id: SplitId

Split ID to scroll

§buffer_id: BufferId

Buffer ID containing the line

§line: usize

Line number to center (0-indexed)

§

ScrollBufferToLine

Scroll any split/panel that displays buffer_id so the given line is visible in the viewport. Unlike ScrollToLineCenter this does not require a split id — it walks all splits (including inner panels of a buffer group) and updates every viewport that shows this buffer. Line is 0-indexed.

Fields

§buffer_id: BufferId

Buffer ID to scroll

§line: usize

Line number to bring into view (0-indexed)

§

SetEditorMode

Set the global editor mode (for modal editing like vi mode) When set, the mode’s keybindings take precedence over normal editing

Fields

§mode: Option<String>

Mode name (e.g., “vi-normal”, “vi-insert”) or None to clear

§

ShowActionPopup

Show an action popup with buttons for user interaction When the user selects an action, the ActionPopupResult hook is fired

Fields

§popup_id: String

Unique identifier for the popup (used in ActionPopupResult)

§title: String

Title text for the popup

§message: String

Body message (supports basic formatting)

§actions: Vec<ActionPopupAction>

Action buttons to display

§

SetLspMenuContributions

Contribute (or replace, or clear) a set of menu rows for the LSP-Servers popup (the popup opened by clicking the LSP indicator). Each plugin owns its own slice keyed by plugin_id; passing an empty items clears that slice.

Rationale: previously plugins reacting to lsp_status_clicked pushed their own separate action popup via ShowActionPopup, which stacked over the built-in LSP-Servers popup and created the UX conflict in PR #1941. This command lets plugins contribute rows that merge into the existing popup instead. Selecting a contributed row fires action_popup_result with popup_id = "lsp_status" and action_id = "{plugin_id}|{id}".

Fields

§plugin_id: String

Stable plugin identifier used both as the namespace for this slice of contributions and as the prefix of the resulting action_popup_result.action_id.

§language: String

Language whose LSP-Servers popup should display these rows (e.g. “rust”, “python”).

§items: Vec<LspMenuItem>

The rows to install. Empty clears any previous contribution from this plugin_id for this language.

§

DisableLspForLanguage

Disable LSP for a specific language and persist to config

Fields

§language: String

The language to disable LSP for (e.g., “python”, “rust”)

§

RestartLspForLanguage

Restart LSP server for a specific language

Fields

§language: String

The language to restart LSP for (e.g., “python”, “rust”)

§

SetLspRootUri

Set the workspace root URI for a specific language’s LSP server This allows plugins to specify project roots (e.g., directory containing .csproj) If the LSP is already running, it will be restarted with the new root

Fields

§language: String

The language to set root URI for (e.g., “csharp”, “rust”)

§uri: String

The root URI (file:// URL format)

§

CreateScrollSyncGroup

Create a scroll sync group for anchor-based synchronized scrolling Used for side-by-side diff views where two panes need to scroll together The plugin provides the group ID (must be unique per plugin)

Fields

§group_id: u32

Plugin-assigned group ID

§left_split: SplitId

The left (primary) split - scroll position is tracked in this split’s line space

§right_split: SplitId

The right (secondary) split - position is derived from anchors

§

SetScrollSyncAnchors

Set sync anchors for a scroll sync group Anchors map corresponding line numbers between left and right buffers

Fields

§group_id: u32

The group ID returned by CreateScrollSyncGroup

§anchors: Vec<(usize, usize)>

List of (left_line, right_line) pairs marking corresponding positions

§

RemoveScrollSyncGroup

Remove a scroll sync group

Fields

§group_id: u32

The group ID returned by CreateScrollSyncGroup

§

SaveBufferToPath

Save a buffer to a specific file path Used by :w filename command to save unnamed buffers or save-as

Fields

§buffer_id: BufferId

Buffer ID to save

§path: PathBuf

Path to save to

§

LoadPlugin

Load a plugin from a file path The plugin will be initialized and start receiving events

Fields

§path: PathBuf

Path to the plugin file (.ts or .js)

§callback_id: JsCallbackId

Callback ID for async response (success/failure)

§

UnloadPlugin

Unload a plugin by name The plugin will stop receiving events and be removed from memory

Fields

§name: String

Plugin name (as registered)

§callback_id: JsCallbackId

Callback ID for async response (success/failure)

§

ReloadPlugin

Reload a plugin by name (unload + load) Useful for development when plugin code changes

Fields

§name: String

Plugin name (as registered)

§callback_id: JsCallbackId

Callback ID for async response (success/failure)

§

ListPlugins

List all loaded plugins Returns plugin info (name, path, enabled) for all loaded plugins

Fields

§callback_id: JsCallbackId

Callback ID for async response (JSON array of plugin info)

§

ReloadThemes

Reload the theme registry from disk Call this after installing a theme package or saving a new theme. If apply_theme is set, apply that theme immediately after reloading.

Fields

§apply_theme: Option<String>
§

RegisterGrammar

Register a TextMate grammar file for a language The grammar will be added to pending_grammars until ReloadGrammars is called

Fields

§language: String

Language identifier (e.g., “elixir”, “zig”)

§grammar_path: String

Path to the grammar file (.sublime-syntax or .tmLanguage)

§extensions: Vec<String>

File extensions to associate with this grammar (e.g., [“ex”, “exs”])

§

RegisterLanguageConfig

Register language configuration (comment prefix, indentation, formatter) This is applied immediately to the runtime config

Fields

§language: String

Language identifier (e.g., “elixir”)

§config: LanguagePackConfig

Language configuration

§

RegisterLspServer

Register an LSP server for a language This is applied immediately to the LSP manager and runtime config

Fields

§language: String

Language identifier (e.g., “elixir”)

§config: LspServerPackConfig

LSP server configuration

§

ReloadGrammars

Reload the grammar registry to apply registered grammars (async) Call this after registering one or more grammars to rebuild the syntax set. The callback is resolved when the background grammar build completes.

Fields

§callback_id: JsCallbackId
§

CreateTerminal

Create a new terminal in a split (async, returns TerminalResult) This spawns a PTY-backed terminal that plugins can write to and read from.

Fields

§cwd: Option<String>

Working directory for the terminal (defaults to editor cwd)

§direction: Option<String>

Split direction (“horizontal” or “vertical”), default vertical

§ratio: Option<f32>

Split ratio (0.0 to 1.0), default 0.5

§focus: Option<bool>

Whether to focus the new terminal split (default true)

§persistent: bool

Whether this terminal survives editor restarts. When false, the terminal is excluded from workspace serialization and its backing file is kept unique-per-spawn so no scrollback from a prior run leaks in. Plugin-created terminals default to false since they are typically one-off tool UIs (rebuilds, exec shells, etc.).

§window_id: Option<WindowId>

Optional session id to attach the new terminal buffer to. None (default) attaches to the active session at creation time — the historical behaviour. Some(id) lets Orchestrator (and any plugin spawning agents in worktrees) attach the terminal to its target session without diving first; the terminal’s split is created in that session’s stashed split tree, and the buffer is added to the target session’s Session.buffers membership rather than the active one’s. Falls back to active session if the id is unknown.

§command: Option<Vec<String>>

Argv to spawn directly in the PTY in lieu of the host’s configured shell. See CreateTerminalOptions::command for the full semantics — None keeps the shell-and-type behaviour, Some(argv) runs argv as the PTY child.

§title: Option<String>

Tab title override. Defaults to command[0] (when command is set) or "Terminal N" (when it isn’t). See CreateTerminalOptions::title.

§request_id: u64

Callback ID for async response

§

SendTerminalInput

Send input data to a terminal by its terminal ID

Fields

§terminal_id: TerminalId

The terminal ID (from TerminalResult)

§data: String

Data to write to the terminal PTY (UTF-8 string, may include escape sequences)

§

CloseTerminal

Close a terminal by its terminal ID

Fields

§terminal_id: TerminalId

The terminal ID to close

§

SignalWindow

Send signal to every process group tracked by the window id. signal is one of "SIGTERM" / "SIGKILL" / "SIGINT" / "SIGHUP"; the window’s authority determines the actual delivery mechanism (local kill(-pgid, …) on host, docker exec kill … for container authorities, SSH agent for remote ones — see app/window/process_group.rs). Idempotent across already-exited groups: callers can retry safely.

Fields

§signal: String
§

GrepProject

Project-wide grep search (async) Searches all project files via FileSystem trait, respecting .gitignore. For open buffers with dirty edits, searches the buffer’s piece tree.

Fields

§pattern: String

Search pattern (literal string)

§fixed_string: bool

Whether the pattern is a fixed string (true) or regex (false)

§case_sensitive: bool

Whether the search is case-sensitive

§max_results: usize

Maximum number of results to return

§whole_words: bool

Whether to match whole words only

§callback_id: JsCallbackId

Callback ID for async response

§

BeginSearch

Project-wide streaming search using a pull-based handle.

The plugin allocates handle_id and registers an Arc<SearchHandleState> in the shared SearchHandleRegistry before sending this command. The editor’s searcher tasks look up the same entry and write matches directly into its pending vec — no per-chunk JS dispatch. The plugin drains state via editor._searchHandleTake(handle_id) at its own pace.

Fields

§pattern: String

Search pattern

§fixed_string: bool

Whether the pattern is a fixed string (true) or regex (false)

§case_sensitive: bool

Whether the search is case-sensitive

§max_results: usize

Maximum number of results before the search self-truncates

§whole_words: bool

Whether to match whole words only

§handle_id: u64

Handle ID — key into the shared SearchHandleRegistry

§

ReplaceInBuffer

Replace matches in a buffer (async) Opens the file if not already open, applies edits through the buffer model, groups as a single undo action, and saves via FileSystem trait.

Fields

§file_path: PathBuf

File path to edit (will open if not already in a buffer)

§matches: Vec<(usize, usize)>

Matches to replace, each is (byte_offset, length)

§replacement: String

Replacement text

§callback_id: JsCallbackId

Callback ID for async response

§

SetAuthority

Install a new authority.

Authority is opaque to core. The payload is a tagged JSON object (filesystem kind + spawner kind + terminal wrapper + display label) that fresh-editor deserializes into its concrete AuthorityPayload type. Using serde_json::Value here keeps fresh-core from growing backend-specific knowledge; see crates/fresh-editor/src/services/authority/mod.rs for the canonical schema.

Fire-and-forget: the transition piggy-backs on the existing editor restart flow, so the plugin that sent this command will be re-loaded as part of the restart. Any follow-up work the plugin wants to do after the switch belongs in its post-restart init code, not in a callback here.

Fields

§payload: Value
§

ClearAuthority

Restore the default local authority. Same semantics as SetAuthority with a local payload — triggers an editor restart.

§

SetRemoteIndicatorState

Override the Remote Indicator’s displayed state for the rest of the current editor session (until a restart, or until the plugin sends another override / ClearRemoteIndicatorState).

The derived state — computed from the active authority’s connection info — keeps running underneath and is what the indicator shows whenever an override is not in effect. Plugins use this to surface lifecycle states that have no authority-level truth yet (e.g. “Connecting” during devcontainer up, “FailedAttach” after a non-zero exit).

state is a tagged enum keyed by kind:

  • { "kind": "local" }
  • { "kind": "connecting", "label": "..." }
  • { "kind": "connected", "label": "..." }
  • { "kind": "failed_attach", "error": "..." }
  • { "kind": "disconnected", "label": "..." }

The exact schema lives in crates/fresh-editor/src/view/ui/status_bar.rs; fresh-core takes it opaquely so new variants can land without touching core plumbing.

Fields

§state: Value
§

ClearRemoteIndicatorState

Drop any active Remote Indicator override and fall back to the authority-derived state. Safe to call without a prior SetRemoteIndicatorState.

§

SpawnHostProcess

Spawn a process on the host, regardless of the currently installed authority.

Intended for plugin internals that must run host-side work (e.g. devcontainer up) before installing an authority that would otherwise route the spawn elsewhere. Behaves like SpawnProcess but always uses LocalProcessSpawner.

The TS-side handle exposes .kill() on the returned ProcessHandle, serviced by KillHostProcess below — this lets callers abort a long-running host spawn (e.g. devcontainer up) via a user action like “Cancel Startup”.

Fields

§command: String
§args: Vec<String>
§callback_id: JsCallbackId
§

KillHostProcess

Cancel a host-side process previously started via SpawnHostProcess. process_id is the callback id returned by spawnHostProcess (the TS handle stores it and forwards when the caller invokes .kill()).

No-op when the id is unknown — the process may have already exited, or the caller may hold a stale handle. SIGKILL on Unix per tokio::process::Child::start_kill; children of the killed process may leak (see Q-C2 in DEVCONTAINER_SPEC_GAP_PLAN.md).

Fields

§process_id: u64
§

MountWidgetPanel

Mount a declarative widget panel inside an existing virtual buffer. The host renders the WidgetSpec and writes the resulting text-property entries into the buffer. The panel_id is plugin-allocated (any unique u64 for that plugin) and is used to address the panel for later UpdateWidgetPanel / UnmountWidgetPanel calls.

See docs/internal/plugin-widget-library-design.md.

Fields

§panel_id: u64
§buffer_id: BufferId
§

UpdateWidgetPanel

Replace the spec of a previously-mounted widget panel. The reconciler diffs against the previous spec and applies the minimum mutation; widget instance state is preserved on nodes whose key matches.

Fields

§panel_id: u64
§

UnmountWidgetPanel

Tear down a widget panel. Subsequent UpdateWidgetPanel calls for the same panel_id are no-ops.

Fields

§panel_id: u64
§

WidgetCommand

Route a keystroke / nav action to the panel’s currently focused widget. The plugin’s defineMode bindings dispatch here for keys that should be handled by the widget layer (Tab cycle, Enter to activate, Up/Down to navigate a List, Backspace / arrows / printable input to edit a TextInput). See WidgetAction for the action shapes.

Fields

§panel_id: u64
§

WidgetMutate

Apply a targeted mutation to a mounted widget panel without re-transmitting the full spec. The IPC fast path for hot-path updates (typing, selection moves, partial list refreshes). See WidgetMutation for the shapes.

Fields

§panel_id: u64
§

MountFloatingWidget

Mount a declarative widget panel as a centered floating overlay rather than into a virtual buffer. width_pct and height_pct size the overlay rect relative to the terminal (clamped 1..=100). Only one floating widget panel may be mounted at a time; a second MountFloatingWidget replaces any existing one.

Fields

§panel_id: u64
§width_pct: u8
§height_pct: u8
§

UpdateFloatingWidget

Replace the spec of the currently-mounted floating widget panel. No-op when no floating panel is mounted, or when the panel_id doesn’t match the mounted one.

Fields

§panel_id: u64
§

UnmountFloatingWidget

Tear down the floating widget panel. No-op when no floating panel is mounted, or when the panel_id doesn’t match.

Fields

§panel_id: u64

Implementations§

Source§

impl PluginCommand

Source

pub fn debug_variant_name(&self) -> String

Extract the enum variant name from the Debug representation.

Trait Implementations§

Source§

impl Clone for PluginCommand

Source§

fn clone(&self) -> PluginCommand

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 PluginCommand

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for PluginCommand

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<PluginCommand, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for PluginCommand

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TS for PluginCommand

Source§

type WithoutGenerics = PluginCommand

If this type does not have generic parameters, then WithoutGenerics should just be Self. If the type does have generic parameters, then all generic parameters must be replaced with a dummy type, e.g ts_rs::Dummy or ().
The only requirement for these dummy types is that EXPORT_TO must be None. Read more
Source§

type OptionInnerType = PluginCommand

If the implementing type is std::option::Option<T>, then this associated type is set to T. All other implementations of TS should set this type to Self instead.
Source§

fn ident(cfg: &Config) -> String

Identifier of this type, excluding generic parameters.
Source§

fn docs() -> Option<String>

JSDoc comment to describe this type in TypeScript - when TS is derived, docs are automatically read from your doc comments or #[doc = ".."] attributes
Source§

fn name(cfg: &Config) -> String

Name of this type in TypeScript, including generic parameters
Source§

fn decl_concrete(cfg: &Config) -> String

Declaration of this type using the supplied generic arguments. The resulting TypeScript definition will not be generic. For that, see TS::decl(). If this type is not generic, then this function is equivalent to TS::decl().
Source§

fn decl(cfg: &Config) -> String

Declaration of this type, e.g. type User = { user_id: number, ... }. This function will panic if the type has no declaration. Read more
Source§

fn inline(cfg: &Config) -> String

Formats this types definition in TypeScript, e.g { user_id: number }. This function will panic if the type cannot be inlined.
Source§

fn inline_flattened(cfg: &Config) -> String

Flatten a type declaration. This function will panic if the type cannot be flattened.
Source§

fn visit_generics(v: &mut impl TypeVisitor)
where PluginCommand: 'static,

Iterates over all type parameters of this type.
Source§

fn output_path() -> Option<PathBuf>

Returns the output path to where T should be exported, relative to the output directory. The returned path does not include any base directory. Read more
Source§

fn visit_dependencies(v: &mut impl TypeVisitor)
where PluginCommand: 'static,

Iterates over all dependency of this type.
Source§

fn dependencies(cfg: &Config) -> Vec<Dependency>
where Self: 'static,

Resolves all dependencies of this type recursively.
Source§

fn export(cfg: &Config) -> Result<(), ExportError>
where Self: 'static,

Manually export this type to the filesystem. To export this type together with all of its dependencies, use TS::export_all. Read more
Source§

fn export_all(cfg: &Config) -> Result<(), ExportError>
where Self: 'static,

Manually export this type to the filesystem, together with all of its dependencies. To export only this type, without its dependencies, use TS::export. Read more
Source§

fn export_to_string(cfg: &Config) -> Result<String, ExportError>
where Self: 'static,

Manually generate bindings for this type, returning a String. This function does not format the output, even if the format feature is enabled. 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> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<'a, T> FromIn<'a, T> for T

Source§

fn from_in(t: T, _: &'a Allocator) -> T

Converts to this type from the input type within the given allocator.
Source§

impl<T> Instrument for T

Source§

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

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

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.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<'a, T, U> IntoIn<'a, U> for T
where U: FromIn<'a, T>,

Source§

fn into_in(self, allocator: &'a Allocator) -> U

Converts this type into the (usually inferred) input type within the given allocator.
Source§

impl<D> OwoColorize for D

Source§

fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>
where C: Color,

Set the foreground color generically Read more
Source§

fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>
where C: Color,

Set the background color generically. Read more
Source§

fn black(&self) -> FgColorDisplay<'_, Black, Self>

Change the foreground color to black
Source§

fn on_black(&self) -> BgColorDisplay<'_, Black, Self>

Change the background color to black
Source§

fn red(&self) -> FgColorDisplay<'_, Red, Self>

Change the foreground color to red
Source§

fn on_red(&self) -> BgColorDisplay<'_, Red, Self>

Change the background color to red
Source§

fn green(&self) -> FgColorDisplay<'_, Green, Self>

Change the foreground color to green
Source§

fn on_green(&self) -> BgColorDisplay<'_, Green, Self>

Change the background color to green
Source§

fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>

Change the foreground color to yellow
Source§

fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>

Change the background color to yellow
Source§

fn blue(&self) -> FgColorDisplay<'_, Blue, Self>

Change the foreground color to blue
Source§

fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>

Change the background color to blue
Source§

fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to magenta
Source§

fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to magenta
Source§

fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to purple
Source§

fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to purple
Source§

fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>

Change the foreground color to cyan
Source§

fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>

Change the background color to cyan
Source§

fn white(&self) -> FgColorDisplay<'_, White, Self>

Change the foreground color to white
Source§

fn on_white(&self) -> BgColorDisplay<'_, White, Self>

Change the background color to white
Source§

fn default_color(&self) -> FgColorDisplay<'_, Default, Self>

Change the foreground color to the terminal default
Source§

fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>

Change the background color to the terminal default
Source§

fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>

Change the foreground color to bright black
Source§

fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>

Change the background color to bright black
Source§

fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>

Change the foreground color to bright red
Source§

fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>

Change the background color to bright red
Source§

fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>

Change the foreground color to bright green
Source§

fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>

Change the background color to bright green
Source§

fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>

Change the foreground color to bright yellow
Source§

fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>

Change the background color to bright yellow
Source§

fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>

Change the foreground color to bright blue
Source§

fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>

Change the background color to bright blue
Source§

fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright magenta
Source§

fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright magenta
Source§

fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright purple
Source§

fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright purple
Source§

fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>

Change the foreground color to bright cyan
Source§

fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>

Change the background color to bright cyan
Source§

fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>

Change the foreground color to bright white
Source§

fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>

Change the background color to bright white
Source§

fn bold(&self) -> BoldDisplay<'_, Self>

Make the text bold
Source§

fn dimmed(&self) -> DimDisplay<'_, Self>

Make the text dim
Source§

fn italic(&self) -> ItalicDisplay<'_, Self>

Make the text italicized
Source§

fn underline(&self) -> UnderlineDisplay<'_, Self>

Make the text underlined
Make the text blink
Make the text blink (but fast!)
Source§

fn reversed(&self) -> ReversedDisplay<'_, Self>

Swap the foreground and background colors
Source§

fn hidden(&self) -> HiddenDisplay<'_, Self>

Hide the text
Source§

fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>

Cross out the text
Source§

fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the foreground color at runtime. Only use if you do not know which color will be used at compile-time. If the color is constant, use either OwoColorize::fg or a color-specific method, such as OwoColorize::green, Read more
Source§

fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the background color at runtime. Only use if you do not know what color to use at compile-time. If the color is constant, use either OwoColorize::bg or a color-specific method, such as OwoColorize::on_yellow, Read more
Source§

fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the foreground color to a specific RGB value.
Source§

fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the background color to a specific RGB value.
Source§

fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>

Sets the foreground color to an RGB value.
Source§

fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>

Sets the background color to an RGB value.
Source§

fn style(&self, style: Style) -> Styled<&Self>

Apply a runtime-determined style
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

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

Initializes a with the given initializer. Read more
Source§

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

Dereferences the given pointer. Read more
Source§

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

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

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

impl<T> Same for T

Source§

type Output = T

Should always be Self
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> TryClone for T
where T: Clone,

Source§

fn try_clone(&self) -> Result<T, Error>

Clones self, possibly returning an error.
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.
Source§

impl<T> WithSubscriber for T

Source§

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ParallelSend for T