Interface FoldingRangeProvider

Language-specific service for handling folding range requests.

interface FoldingRangeProvider {
    getFoldingRanges(document: LangiumDocument<AstNode>, params: FoldingRangeParams, cancelToken?: CancellationToken): MaybePromise<FoldingRange[]>;
}

Implemented by

Methods

  • Handle a folding range request.

    Parameters

    • document: LangiumDocument<AstNode>

      The document to compute folding ranges for

    • params: FoldingRangeParams

      The folding range parameters

    • OptionalcancelToken: CancellationToken

      A cancellation token that can be used to cancel the request

    Returns MaybePromise<FoldingRange[]>

    The computed folding ranges

    OperationCancelled if cancellation is detected during execution

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