Module semantic_token

Source

Structs§

HIGHLIGHTER_CONFIG
Global configuration for syntax highlighting.
HIGHLIGHT_INDEX_TO_LSP_INDEX
Translate indices from HIGHLIGHT_NAMES to indices from LEGEND_TOKEN_TYPE.
HIGHLIGHT_NAMES
Tree sitter highlighting names. This is used to perform syntax highlighting with tree sitter.
LEGEND_TOKEN_TYPE
Legend for token types. This is sent to the LSP client with the semantic tokens capabilities.
NAME_TO_TOKEN_TYPE
Tree sitter capture names into LSP semantic token types. Changes to this table don’t need to be added anywhere else due to the structures below.

Functions§

semantic_tokens
Generate the semantic tokens of a document for syntax highlighting.