pub enum PluginCommand {
Show 142 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,
},
RegisterCommand {
command: Command,
},
UnregisterCommand {
name: String,
},
OpenFileInBackground {
path: PathBuf,
},
InsertAtCursor {
text: String,
},
SpawnProcess {
command: String,
args: Vec<String>,
cwd: Option<String>,
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>,
},
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,
},
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,
},
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,
},
StartPromptWithInitial {
label: String,
prompt_type: String,
initial_value: String,
},
StartPromptAsync {
label: String,
initial_value: String,
callback_id: JsCallbackId,
},
AwaitNextKey {
callback_id: JsCallbackId,
},
SetKeyCaptureActive {
active: bool,
},
SetPromptSuggestions {
suggestions: Vec<Suggestion>,
},
SetPromptInputSync {
sync: bool,
},
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 13 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,
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,
},
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,
},
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>,
},
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,
request_id: u64,
},
SendTerminalInput {
terminal_id: TerminalId,
data: String,
},
CloseTerminal {
terminal_id: TerminalId,
},
GrepProject {
pattern: String,
fixed_string: bool,
case_sensitive: bool,
max_results: usize,
whole_words: bool,
callback_id: JsCallbackId,
},
GrepProjectStreaming {
pattern: String,
fixed_string: bool,
case_sensitive: bool,
max_results: usize,
whole_words: bool,
search_id: u64,
callback_id: JsCallbackId,
},
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,
},
}Expand description
Plugin command - allows plugins to send commands to the editor
Variants§
InsertText
Insert text at a position in a buffer
DeleteRange
Delete a range of text from a buffer
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
namespace: Option<OverlayNamespace>options: OverlayOptionsOverlay styling options (colors, modifiers, etc.)
RemoveOverlay
Remove an overlay by its opaque handle
SetStatus
Set status message
ApplyTheme
Apply a theme by name
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.
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.
RegisterCommand
Register a custom command
UnregisterCommand
Unregister a command by name
OpenFileInBackground
Open a file in the editor (in background, without switching focus)
InsertAtCursor
Insert text at the current cursor position in the active buffer
SpawnProcess
Spawn an async process
Delay
Delay/sleep for a duration (async, resolves callback when done)
SpawnBackgroundProcess
Spawn a long-running background process Unlike SpawnProcess, this returns immediately with a process handle and provides streaming output via hooks
Fields
callback_id: JsCallbackIdCallback ID to call when process exits
KillBackgroundProcess
Kill a background process by ID
SpawnProcessWait
Wait for a process to complete and get its result Used with processes started via SpawnProcess
Fields
callback_id: JsCallbackIdCallback ID for async response
SetLayoutHints
Set layout hints for a buffer/viewport
SetLineNumbers
Enable/disable line numbers for a buffer
SetViewMode
Set the view mode for a buffer (“source” or “compose”)
SetLineWrap
Enable/disable line wrapping for a buffer
SubmitViewTransform
Submit a transformed view stream for a viewport
ClearViewTransform
Clear view transform for a buffer/split (returns to normal rendering)
SetViewState
Set plugin-managed view state for a buffer in the active split. Stored in BufferViewState.plugin_state and persisted across sessions.
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.
ClearAllOverlays
Remove all overlays from a buffer
ClearNamespace
Remove all overlays in a namespace
ClearOverlaysInRange
Remove all overlays that overlap with a byte range Used for targeted invalidation when content in a range changes
AddVirtualText
Add virtual text (inline text that doesn’t exist in the buffer) Used for color swatches, type hints, parameter hints, etc.
Fields
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.
RemoveVirtualText
Remove a virtual text by ID
RemoveVirtualTextsByPrefix
Remove virtual texts whose ID starts with the given prefix
ClearVirtualTexts
Clear all virtual texts from a buffer
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
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).
ClearVirtualTextNamespace
Clear all virtual texts in a namespace This is the primary way to remove a plugin’s virtual lines before updating them.
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
namespace: OverlayNamespaceNamespace for bulk removal (shared with overlay namespace system)
ClearConcealNamespace
Clear all conceal ranges in a namespace
ClearConcealsInRange
Remove all conceal ranges that overlap with a byte range Used for targeted invalidation when content in a range changes
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
ClearFolds
Clear every collapsed fold range on the buffer.
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
namespace: OverlayNamespaceNamespace for bulk removal (shared with overlay namespace system)
ClearSoftBreakNamespace
Clear all soft breaks in a namespace
ClearSoftBreaksInRange
Remove all soft breaks that fall within a byte range
RefreshLines
Refresh lines for a buffer (clear seen_lines cache to re-trigger lines_changed hook)
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.
SetLineIndicator
Set a line indicator in the gutter’s indicator column Used for git gutter, breakpoints, bookmarks, etc.
Fields
SetLineIndicators
Batch set line indicators in the gutter’s indicator column Optimized for setting many lines with the same namespace/symbol/color/priority
Fields
ClearLineIndicators
Clear all line indicators for a specific namespace
SetFileExplorerDecorations
Set file explorer decorations for a namespace
Fields
decorations: Vec<FileExplorerDecoration>Decorations to apply
ClearFileExplorerDecorations
Clear file explorer decorations for a namespace
OpenFileAtLocation
Open a file at a specific line and column Line and column are 1-indexed to match git grep output
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
StartPrompt
Start a prompt (minibuffer) with a custom type identifier This allows plugins to create interactive prompts
StartPromptWithInitial
Start a prompt with pre-filled initial value
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
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: JsCallbackIdSetKeyCaptureActive
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).
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
AddMenuItem
Add a menu item to an existing menu Add a menu item to an existing menu
AddMenu
Add a new top-level menu
RemoveMenuItem
Remove a menu item from a menu
RemoveMenu
Remove a top-level menu
Fields
CreateVirtualBuffer
Create a new virtual buffer (not backed by a file)
Fields
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
entries: Vec<TextPropertyEntry>Entries with text and embedded properties
Whether this buffer should be hidden from tabs (for composite source buffers)
CreateVirtualBufferInSplit
Create a virtual buffer in a horizontal split Opens the buffer in a new pane below the current one
Fields
entries: Vec<TextPropertyEntry>Entries with text and embedded properties
SetVirtualBufferContent
Set the content of a virtual buffer with text properties
GetTextPropertiesAtCursor
Get text properties at the cursor position in a buffer
CreateBufferGroup
Create a buffer group: multiple panels appearing as one tab. Each panel is a real buffer with its own scrollbar and viewport.
Fields
SetPanelContent
Set the content of a panel within a buffer group.
Fields
entries: Vec<TextPropertyEntry>Content entries
CloseBufferGroup
Close a buffer group (closes all panels and splits)
FocusPanel
Focus a specific panel within a buffer group
DefineMode
Define a buffer mode with keybindings
Fields
ShowBuffer
Switch the current split to display a buffer
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.
CancelAnimation
Cancel an animation by the ID returned from animateArea /
animateVirtualBuffer. No-op if the ID is unknown or already done.
CreateVirtualBufferInExistingSplit
Create a virtual buffer in an existing split (replaces current buffer in that split)
Fields
entries: Vec<TextPropertyEntry>Entries with text and embedded properties
CloseBuffer
Close a buffer and remove it from all splits
CreateCompositeBuffer
Create a composite buffer that displays multiple source buffers Used for side-by-side diff, unified diff, and 3-way merge views
Fields
layout: CompositeLayoutConfigLayout configuration
sources: Vec<CompositeSourceConfig>Source pane configurations
hunks: Option<Vec<CompositeHunk>>Diff hunks for line alignment (optional)
UpdateCompositeAlignment
Update alignment for a composite buffer (e.g., after source edit)
CloseCompositeBuffer
Close a composite buffer
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
CompositePrevHunk
Navigate to the previous hunk in a composite buffer
FocusSplit
Focus a specific split
SetSplitBuffer
Set the buffer displayed in a specific split
SetSplitScroll
Set the scroll position of a specific split
RequestHighlights
Request syntax highlights for a buffer range
CloseSplit
Close a split (if not the last one)
SetSplitRatio
Set the ratio of a split container
SetSplitLabel
Set a label on a leaf split (e.g., “sidebar”)
ClearSplitLabel
Remove a label from a split
GetSplitByLabel
Find a split by its label (async)
DistributeSplitsEvenly
Distribute splits evenly - make all given splits equal size
SetBufferCursor
Set cursor position in a buffer (also scrolls viewport to show 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.
SendLspRequest
Send an arbitrary LSP request and return the raw JSON response
SetClipboard
Set the internal clipboard content
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
SetReviewDiffHunks
Set the hunks for the Review Diff tool
Fields
hunks: Vec<ReviewHunk>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
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
GetLineStartPosition
Get byte offset of the start of a line (async) Line is 0-indexed (0 = first line)
Fields
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
GetBufferLineCount
Get the total number of lines in a buffer (async)
Fields
ScrollToLineCenter
Scroll a split to center a specific line in the viewport Line is 0-indexed (0 = first line)
Fields
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
SetEditorMode
Set the global editor mode (for modal editing like vi mode) When set, the mode’s keybindings take precedence over normal editing
ShowActionPopup
Show an action popup with buttons for user interaction When the user selects an action, the ActionPopupResult hook is fired
Fields
actions: Vec<ActionPopupAction>Action buttons to display
DisableLspForLanguage
Disable LSP for a specific language and persist to config
RestartLspForLanguage
Restart LSP server for a specific language
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
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
SetScrollSyncAnchors
Set sync anchors for a scroll sync group Anchors map corresponding line numbers between left and right buffers
Fields
RemoveScrollSyncGroup
Remove a scroll sync group
SaveBufferToPath
Save a buffer to a specific file path Used by :w filename command to save unnamed buffers or save-as
LoadPlugin
Load a plugin from a file path The plugin will be initialized and start receiving events
Fields
callback_id: JsCallbackIdCallback ID for async response (success/failure)
UnloadPlugin
Unload a plugin by name The plugin will stop receiving events and be removed from memory
Fields
callback_id: JsCallbackIdCallback ID for async response (success/failure)
ReloadPlugin
Reload a plugin by name (unload + load) Useful for development when plugin code changes
Fields
callback_id: JsCallbackIdCallback ID for async response (success/failure)
ListPlugins
List all loaded plugins Returns plugin info (name, path, enabled) for all loaded plugins
Fields
callback_id: JsCallbackIdCallback 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.
RegisterGrammar
Register a TextMate grammar file for a language The grammar will be added to pending_grammars until ReloadGrammars is called
Fields
RegisterLanguageConfig
Register language configuration (comment prefix, indentation, formatter) This is applied immediately to the runtime config
Fields
config: LanguagePackConfigLanguage configuration
RegisterLspServer
Register an LSP server for a language This is applied immediately to the LSP manager and runtime config
Fields
config: LspServerPackConfigLSP 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: JsCallbackIdCreateTerminal
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
persistent: boolWhether 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.).
SendTerminalInput
Send input data to a terminal by its terminal ID
Fields
terminal_id: TerminalIdThe terminal ID (from TerminalResult)
CloseTerminal
Close a terminal by its terminal ID
Fields
terminal_id: TerminalIdThe terminal ID to close
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
callback_id: JsCallbackIdCallback ID for async response
GrepProjectStreaming
Project-wide streaming grep search (async, parallel) Like GrepProject but streams results incrementally via progress callback. Searches files in parallel using tokio tasks, sending per-file results back to the plugin as they complete.
Fields
callback_id: JsCallbackIdCallback ID for the completion promise
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
callback_id: JsCallbackIdCallback 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.
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.
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”.
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).
Implementations§
Source§impl PluginCommand
impl PluginCommand
Sourcepub fn debug_variant_name(&self) -> String
pub fn debug_variant_name(&self) -> String
Extract the enum variant name from the Debug representation.
Trait Implementations§
Source§impl Clone for PluginCommand
impl Clone for PluginCommand
Source§fn clone(&self) -> PluginCommand
fn clone(&self) -> PluginCommand
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PluginCommand
impl Debug for PluginCommand
Source§impl<'de> Deserialize<'de> for PluginCommand
impl<'de> Deserialize<'de> for PluginCommand
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PluginCommand, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PluginCommand, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for PluginCommand
impl Serialize for PluginCommand
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl TS for PluginCommand
impl TS for PluginCommand
Source§type WithoutGenerics = PluginCommand
type WithoutGenerics = PluginCommand
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 moreSource§type OptionInnerType = PluginCommand
type OptionInnerType = PluginCommand
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 docs() -> Option<String>
fn docs() -> Option<String>
TS is derived, docs are
automatically read from your doc comments or #[doc = ".."] attributesSource§fn decl_concrete(cfg: &Config) -> String
fn decl_concrete(cfg: &Config) -> String
TS::decl().
If this type is not generic, then this function is equivalent to TS::decl().Source§fn decl(cfg: &Config) -> String
fn decl(cfg: &Config) -> String
type User = { user_id: number, ... }.
This function will panic if the type has no declaration. Read moreSource§fn inline(cfg: &Config) -> String
fn inline(cfg: &Config) -> String
{ user_id: number }.
This function will panic if the type cannot be inlined.Source§fn inline_flattened(cfg: &Config) -> String
fn inline_flattened(cfg: &Config) -> String
Source§fn visit_generics(v: &mut impl TypeVisitor)where
PluginCommand: 'static,
fn visit_generics(v: &mut impl TypeVisitor)where
PluginCommand: 'static,
Source§fn output_path() -> Option<PathBuf>
fn output_path() -> Option<PathBuf>
T should be exported, relative to the output directory.
The returned path does not include any base directory. Read moreSource§fn visit_dependencies(v: &mut impl TypeVisitor)where
PluginCommand: 'static,
fn visit_dependencies(v: &mut impl TypeVisitor)where
PluginCommand: 'static,
Source§fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
Source§fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export_all. Read moreSource§fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export. Read moreSource§fn export_to_string(cfg: &Config) -> Result<String, ExportError>where
Self: 'static,
fn export_to_string(cfg: &Config) -> Result<String, ExportError>where
Self: 'static,
Auto Trait Implementations§
impl Freeze for PluginCommand
impl RefUnwindSafe for PluginCommand
impl Send for PluginCommand
impl Sync for PluginCommand
impl Unpin for PluginCommand
impl UnsafeUnpin for PluginCommand
impl UnwindSafe for PluginCommand
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
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)
fn as_any(&self) -> &(dyn Any + 'static)
&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)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&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
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read more