MingaEditor.Extension.EditorAPI (minga_sdk v0.1.0)

Copy Markdown View Source

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.

Summary

Types

state()

@type state() :: term()

Functions

active_buffer(state)

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

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

active_path(state)

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

focus_buffer(state, buffer_pid)

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

open_file(state, path)

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