A tree-sitter injection range marking an embedded language region.
When a file contains multiple languages (e.g., HTML with embedded JavaScript, Elixir with HEEx templates), tree-sitter reports injection ranges that map byte offsets to the injected language name. These flow from the parser Port through the protocol layer and are stored on editor state for comment toggling and other language-aware operations.
Summary
Functions
Creates a new injection range.
Types
@type t() :: %Minga.Language.Highlight.InjectionRange{ end_byte: non_neg_integer(), language: String.t(), start_byte: non_neg_integer() }
An injection range.
Functions
@spec new(non_neg_integer(), non_neg_integer(), String.t()) :: t()
Creates a new injection range.