Namespace languages

Type Aliases§

CharacterPair

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

Definition
IconPath
IMonarchLanguageAction
IMonarchLanguageRule
InlineCompletionCommand
InlineCompletionEndOfLifeReason
InlineCompletionProviderGroupId
InlineCompletionsDisposeReason
IShortMonarchLanguageAction

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

IShortMonarchLanguageRule1

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
LanguageSelector
LifetimeSummary
ProviderResult

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.

Variables§

css
html
json
typescript

Functions§

getEncodedLanguageId
getLanguages

Get the information of all the registered languages.

register

Register information about a new language.

registerCodeActionProvider

Register a code action provider (used by e.g. quick fix).

registerCodeLensProvider

Register a code lens provider (used by e.g. inline code lenses).

registerColorProvider

Register a document color provider (used by Color Picker, Color Decorator).

registerCompletionItemProvider

Register a completion item provider (use by e.g. suggestions).

registerDeclarationProvider

Register a declaration provider

registerDefinitionProvider

Register a definition provider (used by e.g. go to definition).

registerDocumentFormattingEditProvider

Register a formatter that can handle only entire models.

registerDocumentHighlightProvider

Register a document highlight provider (used by e.g. highlight occurrences).

registerDocumentRangeFormattingEditProvider

Register a formatter that can handle a range inside a model.

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.

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.

registerDocumentSymbolProvider

Register a document symbol provider (used by e.g. outline).

registerFoldingRangeProvider

Register a folding range provider

registerHoverProvider

Register a hover provider (used by e.g. editor hover).

registerImplementationProvider

Register a implementation provider (used by e.g. go to implementation).

registerInlayHintsProvider

Register an inlay hints provider.

registerInlineCompletionsProvider

Register an inline completions provider.

registerLinkedEditingRangeProvider

Register an linked editing range provider.

registerLinkProvider

Register a link provider that can find links in text.

registerNewSymbolNameProvider

Register a new symbol-name provider (e.g., when a symbol is being renamed, show new possible symbol-names)

registerOnTypeFormattingEditProvider

Register a formatter than can do formatting as the user types.

registerReferenceProvider

Register a reference provider (used by e.g. reference search).

registerRenameProvider

Register a rename provider (used by e.g. rename symbol).

registerSelectionRangeProvider

Register a selection range provider

registerSignatureHelpProvider

Register a signature help provider (used by e.g. parameter hints).

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.

registerTypeDefinitionProvider

Register a type definition provider (used by e.g. go to type definition).

setColorMap

Change the color map that is used for token colors. Supported formats (hex): #RRGGBB, $RRGGBBAA, #RGB, #RGBA

setLanguageConfiguration

Set the editing configuration for a language.

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.

setTokensProvider

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

Events§

onLanguage

An event emitted when a language is associated for the first time with a text model.

onLanguageEncountered

An event emitted when a language is associated for the first time with a text model or when a language is encountered during the tokenization of another language.

Enumerations§

CodeActionTriggerType
CompletionItemInsertTextRule
CompletionItemKind
CompletionItemTag
CompletionTriggerKind

How a suggest provider was triggered.

DocumentHighlightKind

A document highlight kind.

HoverVerbosityAction
IndentAction

Describes what to do with the indentation when pressing Enter.

InlayHintKind
InlineCompletionEndOfLifeReasonKind
InlineCompletionHintStyle
InlineCompletionTriggerKind

How an inline completion provider was triggered.

NewSymbolNameTag
NewSymbolNameTriggerKind
PartialAcceptTriggerKind

How a partial acceptance was triggered.

SignatureHelpTriggerKind
SymbolKind

A symbol kind.

SymbolTag

Classes§

EditDeltaInfo
FoldingRangeKind
SelectedSuggestionInfo

Interfaces§

CodeAction
CodeActionContext

Contains additional diagnostic information about the context in which a code action is run.

CodeActionList
CodeActionProvider

The code action interface defines the contract between extensions and the light bulb feature.

CodeActionProviderMetadata

Metadata about the type of code actions that a CodeActionProvider provides.

CodeLens
CodeLensList
CodeLensProvider
Command
CommentAuthorInformation
CommentRule

Describes how comments for a language work.

CommentThreadRevealOptions
CompletionContext

Contains additional information about the context in which completion provider is triggered.

CompletionItem

A completion item represents a text snippet that is proposed to complete text that is being typed.

CompletionItemLabel
CompletionItemProvider

The completion item provider interface defines the contract between extensions and the IntelliSense.

CompletionItemRanges
CompletionList
DeclarationProvider

The definition provider interface defines the contract between extensions and the go to definition and peek definition features.

DefinitionProvider

The definition provider interface defines the contract between extensions and the go to definition and peek definition features.

DocumentColorProvider

A provider of colors for editor models.

DocumentFormattingEditProvider

The document formatting provider interface defines the contract between extensions and the formatting-feature.

DocumentHighlight

A document highlight is a range inside a text document which deserves special attention. Usually a document highlight is visualized by changing the background color of its range.

DocumentHighlightProvider

The document highlight provider interface defines the contract between extensions and the word-highlight-feature.

DocumentRangeFormattingEditProvider

The document formatting provider interface defines the contract between extensions and the formatting-feature.

DocumentRangeSemanticTokensProvider
DocumentSemanticTokensProvider
DocumentSymbol
DocumentSymbolProvider

The document symbol provider interface defines the contract between extensions and the go to symbol-feature.

EncodedTokensProvider

A "manual" provider of tokens, returning tokens in a binary form.

EnterAction

Describes what to do when pressing Enter.

FoldingContext
FoldingMarkers

Describes language specific folding markers such as '#region' and '#endregion'. The start and end regexes will be tested against the contents of all lines and must be designed efficiently:

  • the regex should start with '^'
  • regexp flags (i, g) are ignored
FoldingRange
FoldingRangeProvider

A provider of folding ranges for editor models.

FoldingRules

Describes folding rules for a language.

FormattingOptions

Interface used to format a model

Hover

A hover represents additional information for a symbol or word. Hovers are rendered in a tooltip-like widget.

HoverContext
HoverProvider

The hover provider interface defines the contract between extensions and the hover-feature.

HoverVerbosityRequest
IAutoClosingPair
IAutoClosingPairConditional
IColor

A color in RGBA format.

IColorInformation

A color range is a range in a text model which represents a color.

IColorPresentation

String representations for a color

ICustomEdit
IDocComment

Definition of documentation comments (e.g. Javadoc/JSdoc)

IEncodedLineTokens

The result of a line tokenization.

IExpandedMonarchLanguageAction
IExpandedMonarchLanguageRule
ILanguageExtensionPoint
ILineTokens

The result of a line tokenization.

ILink

A link inside the editor.

ILinksList
IMonarchLanguage

A Monarch language definition

IMonarchLanguageBracket

This interface can be shortened as an array, ie. ['{','}','delimiter.curly']

ImplementationProvider

The implementation provider interface defines the contract between extensions and the go to implementation feature.

IndentationRule

Describes indentation rules for a language.

InlayHint
InlayHintLabelPart
InlayHintList
InlayHintsProvider
InlineCompletion
InlineCompletionContext
InlineCompletionHint
InlineCompletions
InlineCompletionsProvider
InlineCompletionWarning
IRelativePattern
IState

The state of the tokenizer between two lines. It is useful to store flags such as in multiline comment, etc. The model will clone the previous line's state and pass it in to tokenize the next line.

IToken

A token.

IWorkspaceFileEdit
IWorkspaceTextEdit
LanguageConfiguration

The language configuration interface defines the contract between extensions and various editor features, like automatic bracket insertion, automatic indentation etc.

LanguageFilter
LineCommentConfig

Configuration for line comments.

LinkedEditingRangeProvider

The linked editing range provider interface defines the contract between extensions and the linked editing feature.

LinkedEditingRanges

Represents a list of ranges that can be edited together along with a word pattern to describe valid contents.

LinkProvider

A provider of links.

Location

Represents a location inside a resource, such as a line inside a text file.

LocationLink
MultiDocumentHighlight

Represents a set of document highlights for a specific Uri.

MultiDocumentHighlightProvider

A provider that can provide document highlights across multiple documents.

NewSymbolName
NewSymbolNamesProvider
OnEnterRule

Describes a rule to be evaluated when pressing Enter.

OnTypeFormattingEditProvider

The document formatting provider interface defines the contract between extensions and the formatting-feature.

ParameterInformation

Represents a parameter of a callable-signature. A parameter can have a label and a doc-comment.

PartialAcceptInfo

Info provided on partial acceptance.

PendingComment
PendingCommentThread
QueryCapture
ReferenceContext

Value-object that contains additional information when requesting references.

ReferenceProvider

The reference provider interface defines the contract between extensions and the find references-feature.

Rejection
RenameLocation
RenameProvider
SelectionRange
SelectionRangeProvider
SemanticTokens
SemanticTokensEdit
SemanticTokensEdits
SemanticTokensLegend
SignatureHelp

Signature help represents the signature of something callable. There can be multiple signatures but only one active and only one active parameter.

SignatureHelpContext
SignatureHelpProvider

The signature help provider interface defines the contract between extensions and the parameter hints-feature.

SignatureHelpResult
SignatureInformation

Represents the signature of something callable. A signature can have a label, like a function-name, a doc-comment, and a set of parameters.

SyntaxNode
TextEdit
TokensProvider

A "manual" provider of tokens.

TokensProviderFactory

A factory for token providers.

TypeDefinitionProvider

The type definition provider interface defines the contract between extensions and the go to type definition feature.

WorkspaceEdit
WorkspaceEditMetadata
WorkspaceFileEditOptions