MingaEditor.Frontend.Selection (Minga v0.1.0)

Copy Markdown View Source

Resolves which terminal renderer implementation Minga launches.

Go/Bubble Tea is the only terminal frontend. The legacy Zig renderer was removed in #2223; MINGA_FRONTEND=go is the default and the only accepted value. Any other value (including zig) is an error: the launch path raises instead of silently falling back, so a typo never quietly boots the wrong renderer.

This is the single source of truth for the terminal renderer choice. The Frontend.Manager (runtime binary path) and the MingaGoTui compiler (which renderer to build) both read from here.

Summary

Types

Terminal renderer implementation.

Functions

Returns the name of the selection environment variable.

Returns the runtime binary name for the given implementation.

Returns the configured terminal renderer implementation.

Types

tui_impl()

@type tui_impl() :: :go

Terminal renderer implementation.

Functions

env_var()

@spec env_var() :: String.t()

Returns the name of the selection environment variable.

renderer_binary_name(atom)

@spec renderer_binary_name(tui_impl()) :: String.t()

Returns the runtime binary name for the given implementation.

tui_impl()

@spec tui_impl() :: tui_impl()

Returns the configured terminal renderer implementation.

Resolution order:

  1. The MINGA_FRONTEND environment variable (only "go" is valid).
  2. The :tui_impl application env (an atom or string), for tests.
  3. The default, :go.

Raises ArgumentError when MINGA_FRONTEND is set to anything other than "go".