Expand description
Position conversion between LSP Position (UTF-16 code units) and Gruel byte offsets (ADR-0091).
LSP defaults to UTF-16; we also support UTF-8 (LSP 3.17 positionEncoding)
to skip the conversion entirely for capable clients.
Structs§
- LineMap
- Cached line start byte offsets for a source string.
Enums§
- Position
Encoding - Position encoding negotiated with the client.
Functions§
- byte_
to_ position - Convert a byte offset within
sourceto an LSPPosition. - position_
to_ byte - Convert an LSP
Positionto a byte offset withinsource. - span_
to_ range - Convert a Gruel
Span(withinsource) to an LSPRange.