MingaEditor.Renderer.HighlightCache (Minga v0.1.0)

Copy Markdown View Source

Retains composed syntax and semantic presentation by source revision.

Preparation visits each displayed buffer once, independent of its span count on a cache hit. Raw frame sources remain immutable. Hidden buffers retain their composition until their sources are removed; frontend acknowledgement and reset do not affect this derived state.

Summary

Functions

Composes only displayed buffers whose source revisions changed.

Discards outdated compositions without evaluating their replacement.

Types

highlights()

@type highlights() :: %{required(pid()) => MingaEditor.UI.Highlight.t() | nil}

t()

@type t() :: %MingaEditor.Renderer.HighlightCache{
  entries: %{required(pid()) => entry()}
}

Functions

drop_buffer(cache, buffer)

@spec drop_buffer(t(), pid()) :: t()

new()

@spec new() :: t()

prepare(cache, intent)

@spec prepare(t(), MingaEditor.RenderPipeline.Intent.t()) :: {t(), highlights()}

Composes only displayed buffers whose source revisions changed.

retain(cache, intent)

@spec retain(t(), MingaEditor.RenderPipeline.Intent.t()) :: t()

Discards outdated compositions without evaluating their replacement.