Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mapper ¶
type Mapper struct {
// contains filtered or unexported fields
}
func (*Mapper) ApplyEdits ¶ added in v0.1.2
ApplyEdits returns the mapped content with the edits applied. Edits must not overlap; they may arrive in any order. Positions are resolved from LSP (UTF-16) coordinates via the mapper, and later edits apply first so earlier offsets stay valid.
func (*Mapper) GetLSPEndPosition ¶
GetLSPEndPosition returns the position immediately after the last character of the document: the last line (0-based) at the UTF-16 length of its content. A document ending with a newline has an empty last line.
func (*Mapper) LSPPosToParserPosition ¶
LSPPosToParserPosition converts an LSP position (0-based line, UTF-16 code-unit column) to a parser position (1-based line, rune-based column).
Click to show internal directories.
Click to hide internal directories.