tinymist_world::debug_loc

Type Alias LspPosition

Source
pub type LspPosition = Position;
Expand description

A resolved file position. The position is encoded in Utf-8, Utf-16 or Utf-32. The position encoding must be negotiated via some protocol like LSP.

Aliased Type§

struct LspPosition {
    pub line: u32,
    pub character: u32,
}

Fields§

§line: u32

Line position in a document (zero-based).

§character: u32

Character offset on a line in a document (zero-based). The meaning of this offset is determined by the negotiated PositionEncodingKind.

If the character value is greater than the line length it defaults back to the line length.