Expand description
Conversions between Typst and LSP locations
Enums§
- Position
Encoding - 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
.