Class SemanticTokensBuilder

A semantic tokens builder can help with creating a SemanticTokens instance which contains delta encoded semantic tokens.

Constructors

Methods

Constructors

Methods

  • Add another token.

    Parameters

    • line: number

      The token start line number (absolute value).

    • char: number

      The token start character (absolute value).

    • length: number

      The token length in characters.

    • tokenType: number

      The encoded token type.

    • Optional tokenModifiers: number

      The encoded token modifiers.

    Returns void

  • Add another token. Use only when providing a legend.

    Parameters

    • range: Range

      The range of the token. Must be single-line.

    • tokenType: string

      The token type.

    • Optional tokenModifiers: readonly string[]

      The token modifiers.

    Returns void