Interface DocumentHighlightProvider

Language-specific service for handling document highlight requests.

interface DocumentHighlightProvider {
    getDocumentHighlight(document: LangiumDocument<AstNode>, params: DocumentHighlightParams, cancelToken?: CancellationToken): MaybePromise<undefined | DocumentHighlight[]>;
}

Implemented by

Methods

  • Handle a document highlight request.

    Parameters

    • document: LangiumDocument<AstNode>

      The document in which the request was received.

    • params: DocumentHighlightParams

      The parameters of the document highlight request.

    • OptionalcancelToken: CancellationToken

      A cancellation token that can be used to cancel the request.

    Returns MaybePromise<undefined | DocumentHighlight[]>

    The document highlights or undefined if no highlights are available.

    OperationCancelled if cancellation is detected during execution

    ResponseError if an error is detected that should be sent as response to the client