# `MingaEditor.Extension.EditorAPI`
[🔗](https://github.com/jsmestad/minga/blob/main/sdk/lib/minga_editor/extension/editor_api.ex#L1)

High-level editor actions for extensions.

Extensions call these functions from command callbacks to trigger
common editor operations without reaching into EditorState internals.

This is a compile-time stub. At runtime, the real module in Minga's
BEAM VM provides the implementation.

# `state`

```elixir
@type state() :: term()
```

# `active_buffer`

```elixir
@spec active_buffer(state()) :: pid() | nil
```

Returns the active buffer pid, or nil. Read its unsaved text with `Minga.Buffer.content/1`.

# `active_path`

```elixir
@spec active_path(state()) :: String.t() | nil
```

# `focus_buffer`

```elixir
@spec focus_buffer(state(), pid()) :: state()
```

# `navigate_to`

```elixir
@spec navigate_to(state(), String.t(), non_neg_integer(), non_neg_integer()) ::
  state()
```

# `open_file`

```elixir
@spec open_file(state(), String.t()) :: state()
```

---

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