# `MingaEditor.Supervisor`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga_editor/supervisor.ex#L1)

Supervises the editor runtime: tree-sitter parser, renderer, and Editor GenServer.

Uses `rest_for_one` to enforce the dependency chain:

    MingaEditor.Supervisor (rest_for_one)
    ├── Minga.Parser.Manager     Tree-sitter parser Port
    ├── MingaEditor.Frontend.Manager       Zig renderer Port
    └── MingaEditor             Editor orchestration GenServer

If Parser.Manager crashes, Port.Manager and Editor restart (Editor has
stale highlight state). If Port.Manager crashes, Editor restarts (Editor
can't render without the Port). An Editor crash restarts only the Editor.

This supervisor is conditionally started: it only appears in the
supervision tree when the editor UI is active (not in test mode or
headless operation).

# `start_opt`

```elixir
@type start_opt() ::
  {:name, GenServer.name()} | {:backend, MingaEditor.Frontend.Manager.backend()}
```

Options for starting the editor supervisor.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `start_link`

```elixir
@spec start_link([start_opt()]) :: Supervisor.on_start()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
