Module location

Source
Expand description

Conversions between Typst and LSP locations

Enums§

PositionEncoding
What counts as “1 character” for string indexing. We should always prefer UTF-8, but support UTF-16 as long as it is standard. For more background on encodings and LSP, try “The bottom emoji breaks rust-analyzer”, a well-written article on the topic.

Functions§

to_lsp_position
Convert a Typst position to an LSP position.
to_lsp_range
Convert a Typst range to an LSP range.
to_typst_position
Convert an LSP position to a Typst position.
to_typst_range
Convert an LSP range to a Typst range.

Type Aliases§

LspPosition
An LSP Position encoded by PositionEncoding.
LspRange
An LSP range encoded by PositionEncoding.