Skip to main content

semantic_token_edits

Function semantic_token_edits 

Source
pub fn semantic_token_edits(
    prev: &[SemanticToken],
    next: &[SemanticToken],
) -> Vec<SemanticTokensEdit>
Expand description

The minimal single-splice edit list turning prev into next.

Deltas are compared raw: a positional shift changes the first token after the edited region, so prefix/suffix agreement on the encoded stream is exactly the correct splice boundary. Offsets are in INTEGERS (5 per token), as the LSP delta contract requires.