Langium - v4.0.0
    Preparing search index...

    Interface DocumentHighlightProvider

    Language-specific service for handling document highlight requests.

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

    Implemented by

    Index

    Methods

    • Handle a document highlight request.

      Parameters

      • document: LangiumDocument

        The document in which the request was received.

      • params: DocumentHighlightParams

        The parameters of the document highlight request.

      • OptionalcancelToken: Cancellation.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