Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Namespaces

Enumerations

Classes

Interfaces

Type aliases

Events

Functions

Type aliases

CharacterPair

CharacterPair: [string, string]

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

Definition

Definition: Location | Location[] | LocationLink[]

IMonarchLanguageAction

IMonarchLanguageRule

IShortMonarchLanguageAction

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

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

IShortMonarchLanguageRule2: [string | RegExp, IMonarchLanguageAction, string]

ProviderResult

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

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

Type declaration

Events

onLanguage

  • 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

  • getEncodedLanguageId(languageId: string): number

getLanguages

register

registerCodeActionProvider

registerCodeLensProvider

registerColorProvider

registerCompletionItemProvider

registerDeclarationProvider

registerDefinitionProvider

registerDocumentFormattingEditProvider

registerDocumentHighlightProvider

registerDocumentRangeFormattingEditProvider

registerDocumentRangeSemanticTokensProvider

  • 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

registerDocumentSemanticTokensProvider

  • 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

registerDocumentSymbolProvider

registerFoldingRangeProvider

registerHoverProvider

registerImplementationProvider

registerInlayHintsProvider

registerInlineCompletionsProvider

registerLinkProvider

registerLinkedEditingRangeProvider

registerOnTypeFormattingEditProvider

registerReferenceProvider

registerRenameProvider

registerSelectionRangeProvider

registerSignatureHelpProvider

registerTokensProviderFactory

  • 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

registerTypeDefinitionProvider

setColorMap

  • 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

setLanguageConfiguration

setMonarchTokensProvider

  • 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

setTokensProvider