MingaEditor.State.Interaction (Minga v0.1.0)

Copy Markdown View Source

Per-editor input configuration and transient interaction history.

The value owns editing-model selection, isolated keymap/options services, layered focus routing, and keystroke history used by input diagnostics.

Summary

Functions

Commits keystroke history produced by the input recorder.

Removes an input handler from the focus route.

Pushes an input handler unless it already owns focus.

Creates interaction state from startup configuration.

Types

editing_model()

@type editing_model() :: :vim | :cua

t()

@type t() :: %MingaEditor.State.Interaction{
  editing_model: editing_model(),
  focus_stack: [module()],
  keymap_server: Minga.Keymap.server(),
  keystroke_history: MingaEditor.KeystrokeHistory.t(),
  options_server: Minga.Config.Options.server()
}

Functions

accept_keystroke_history(interaction, history)

@spec accept_keystroke_history(t(), MingaEditor.KeystrokeHistory.t()) :: t()

Commits keystroke history produced by the input recorder.

blur(interaction, handler)

@spec blur(t(), module()) :: t()

Removes an input handler from the focus route.

focus(interaction, handler)

@spec focus(t(), module()) :: t()

Pushes an input handler unless it already owns focus.

new(opts \\ [])

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

Creates interaction state from startup configuration.