MingaEditor.RenderModel.Window.DiagnosticIndex (Minga v0.1.0)

Copy Markdown View Source

Persistent resident diagnostic index with lazy suffix shifts.

Diagnostics are grouped by start row. Each compact entry keeps its end-row offset plus source and projected columns. Structural row splices therefore shift an unchanged suffix in logarithmic work, while in-place edits reproject only groups whose start or end touches an edited row.

Summary

Functions

Applies immutable-base row splices and returns final start rows that need column replacement.

Types

compact()

@type compact() ::
  {end_offset :: non_neg_integer(), start_source_col :: non_neg_integer(),
   end_source_col :: non_neg_integer(), Minga.Diagnostics.Diagnostic.encoding(),
   Minga.Diagnostics.Diagnostic.severity(), start_col :: non_neg_integer(),
   end_col :: non_neg_integer()}

t()

@type t() :: %MingaEditor.RenderModel.Window.DiagnosticIndex{root: tree_node()}

tree_node()

work()

@type work() :: %{
  groups_reprojected: non_neg_integer(),
  suffix_shifts: non_neg_integer()
}

Functions

apply_splices(index, splices, resident)

Applies immutable-base row splices and returns final start rows that need column replacement.

build(diagnostics, resident)

ranges_at(index, starts)

to_ranges(diagnostic_index)

@spec to_ranges(t()) :: [Minga.RenderModel.Window.DiagnosticRange.t()]