Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PositionToUTF16 ¶
PositionToUTF16 converts a tree-sitter Point (which uses byte offsets for Column) to LSP Position (which uses UTF-16 code units for Character).
Returns an error if the position exceeds uint32 limits (LSP protocol limitation). This should never happen with normal text files, but guards against parser corruption.
func RangesIntersect ¶
RangesIntersect checks if two LSP ranges intersect. Ranges are treated as half-open intervals [start, end) where the end position is exclusive.
Returns true if the ranges overlap, false otherwise.
Examples:
- [0:0, 0:5) and [0:3, 0:7) -> true (overlap from 0:3 to 0:5)
- [0:0, 0:5) and [0:5, 0:10) -> false (adjacent but not overlapping)
- [0:0, 1:0) and [0:5, 0:10) -> true (first range includes line 0:5)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.