Skip to main content

Crate perl_lsp_semantic_tokens

Crate perl_lsp_semantic_tokens 

Source
Expand description

LSP semantic tokens provider for Perl

This crate provides semantic token generation for syntax highlighting.

§Features

  • Token generation from AST
  • LSP protocol compatibility

§Usage

use perl_lsp_semantic_tokens::collect_semantic_tokens;

let tokens = collect_semantic_tokens(&ast, source, &to_pos16);

Structs§

SemanticTokensProvider
Semantic tokens provider for LSP
TokensLegend
Semantic token legend mapping token types and modifiers to indices

Functions§

collect_semantic_tokens
Collect semantic tokens for LSP highlighting in the Complete stage.
legend
Create the standard semantic token legend for Perl script highlighting

Type Aliases§

EncodedToken
LSP semantic token encoding format for client transmission