MingaEditor.State.ModalOverlay.CommandCompletion (Minga v0.1.0)

Copy Markdown View Source

Modal-overlay payload for the ex-command completion popup.

Unlike the LSP :completion variant, this overlay is a rendering-oriented state container. The command mode FSM owns all key routing; this payload holds pre-computed candidate data so the TUI renderer avoids recomputing fuzzy scores during rendering.

Opened when entering command mode, updated on each keystroke, and closed on mode exit. No trigger lifecycle or tab ownership needed since command mode is inherently single-context.

Summary

Types

t()

@type t() :: %MingaEditor.State.ModalOverlay.CommandCompletion{
  candidates: [MingaEditor.MinibufferData.candidate()],
  filter_text: String.t(),
  selected: non_neg_integer(),
  total: non_neg_integer()
}

Functions

new(opts \\ [])

@spec new(keyword()) :: t()

update(payload, opts)

@spec update(
  t(),
  keyword()
) :: t()