Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Namespaces

Enumerations

Classes

Interfaces

Type aliases

Events

Functions

Type aliases

CharacterPair: [string, string]

A tuple of two characters, like a pair of opening and closing brackets.

Definition: Location | Location[] | LocationLink[]
IShortMonarchLanguageAction: string

An action is either an array of actions... ... or a case statement with guards... ... or a basic action with a token value.

IShortMonarchLanguageRule1: [string | RegExp, IMonarchLanguageAction]

A rule is either a regular expression and an action shorthands: [reg,act] == { regex: reg, action: act} and : [reg,act,nxt] == { regex: reg, action: act{ next: nxt }}

IShortMonarchLanguageRule2: [string | RegExp, IMonarchLanguageAction, string]
ProviderResult<T>: T | undefined | null | Thenable<T | undefined | null>

A provider result represents the values a provider, like the HoverProvider, may return. For once this is the actual result type T, like Hover, or a thenable that resolves to that type T. In addition, null and undefined can be returned - either directly or from a thenable.

Type parameters

  • T

TextEdit: { eol?: EndOfLineSequence; range: IRange; text: string }

Type declaration

Events

  • onLanguage(languageId: string, callback: () => void): IDisposable
  • An event emitted when a language is needed for the first time (e.g. a model has it set).

    Parameters

    • languageId: string
    • callback: () => void
        • (): void
        • Returns void

    Returns IDisposable

Functions

  • getEncodedLanguageId(languageId: string): number
  • Register a document range semantic tokens provider. A semantic tokens provider will complement and enhance a simple top-down tokenizer. Simple top-down tokenizers can be set either via setMonarchTokensProvider or setTokensProvider.

    For the best user experience, register both a semantic tokens provider and a top-down tokenizer.

    Parameters

    Returns IDisposable

  • Register a document semantic tokens provider. A semantic tokens provider will complement and enhance a simple top-down tokenizer. Simple top-down tokenizers can be set either via setMonarchTokensProvider or setTokensProvider.

    For the best user experience, register both a semantic tokens provider and a top-down tokenizer.

    Parameters

    Returns IDisposable

  • Register a tokens provider factory for a language. This tokenizer will be exclusive with a tokenizer set using setTokensProvider or one created using setMonarchTokensProvider, but will work together with a tokens provider set using registerDocumentSemanticTokensProvider or registerDocumentRangeSemanticTokensProvider.

    Parameters

    Returns IDisposable

  • setColorMap(colorMap: string[]): void
  • Change the color map that is used for token colors. Supported formats (hex): #RRGGBB, $RRGGBBAA, #RGB, #RGBA

    Parameters

    • colorMap: string[]

    Returns void

  • Set the tokens provider for a language (monarch implementation). This tokenizer will be exclusive with a tokenizer set using setTokensProvider, or with registerTokensProviderFactory, but will work together with a tokens provider set using registerDocumentSemanticTokensProvider or registerDocumentRangeSemanticTokensProvider.

    Parameters

    Returns IDisposable