Typed editor snapshot for the global status bar.
Computed once per frame from editor state and consumed by the semantic emit
path, which encodes it as the 0x76 (gui_status_bar) structured opcode for
every live frontend.
Summary
Types
Git diff summary: {added, modified, deleted} line counts.
Indentation display information.
Parser availability status.
Visual selection size display information.
Functions
Returns the first diagnostic message on the given cursor line, formatted as a human-readable hint string (icon + message + source). Returns nil if no diagnostics exist on that line.
Returns the diagnostic count 4-tuple for the active buffer, or nil.
Builds the status bar data from the current editor state.
Returns true when the tracked repo's cached status is degraded for path.
Returns {branch_name | nil, diff_summary | nil} for the status bar.
Converts a StatusBar.Data.t() to the map shape expected by Modeline.render/5.
Attaches GUI-ready configured modeline segments to status bar data.
Types
@type git_diff_summary() :: {non_neg_integer(), non_neg_integer(), non_neg_integer()} | nil
Git diff summary: {added, modified, deleted} line counts.
@type indent_type() :: :spaces | :tabs
Indentation display information.
@type parser_status() :: :available | :unavailable | :restarting
Parser availability status.
@type selection_info() :: {:chars, non_neg_integer()} | {:lines, pos_integer()} | nil
Visual selection size display information.
@type t() :: %MingaEditor.StatusBar.Data{
common: MingaEditor.StatusBar.Data.Common.t(),
content:
MingaEditor.StatusBar.Data.Buffer.t() | MingaEditor.StatusBar.Data.Agent.t()
}
Functions
@spec cursor_line_diagnostic_hint(pid() | nil, non_neg_integer()) :: String.t() | nil
Returns the first diagnostic message on the given cursor line, formatted as a human-readable hint string (icon + message + source). Returns nil if no diagnostics exist on that line.
Used by the GUI status bar center segment to show diagnostic context when idle (no status message, no active minibuffer).
@spec diagnostic_modeline_data(pid() | nil) :: {non_neg_integer(), non_neg_integer(), non_neg_integer(), non_neg_integer()} | nil
Returns the diagnostic count 4-tuple for the active buffer, or nil.
@spec from_state(MingaEditor.State.t() | map()) :: t()
Builds the status bar data from the current editor state.
Inspects the active window's content type and returns the appropriate typed content marker. Called once per render frame before the Chrome stage.
Returns true when the tracked repo's cached status is degraded for path.
Reads the repo's cache-only snapshot (no git shell-out). Degraded means the
last git status was trimmed (e.g. timed out on a huge full checkout), so the
modeline shows a visible indicator rather than implying the status is complete.
@spec git_modeline_data(pid() | nil) :: {String.t() | nil, git_diff_summary()}
Returns {branch_name | nil, diff_summary | nil} for the status bar.
@spec to_modeline_data(t()) :: MingaEditor.Shell.Traditional.Modeline.modeline_data()
Converts a StatusBar.Data.t() to the map shape expected by Modeline.render/5.
Both variants carry the same common fields and produce identical modeline data.
@spec with_modeline_segments( t(), MingaEditor.UI.Theme.t(), Minga.Config.ModelineSegments.table() ) :: t()
Attaches GUI-ready configured modeline segments to status bar data.