Module util

Source
Expand description

Utilities for mapping between offset:length bytes and col:row character positions.

Structs§

CharacterRange
Inclusive offset range in characters instead of bytes.
Mapper
A mapper that translates offset:length bytes to 1-based line:row characters.
Position
Range

Traits§

LspExt

Functions§

relative_position
relative_range
Ranges are relative start to start, not end to start.

Type Aliases§

CharacterOffset
Offset in characters instead of bytes. It is u64 because lsp_types uses u64.