Interface DocumentSymbolProvider

Language-specific service for handling document symbols requests.

interface DocumentSymbolProvider {
    getSymbols(document: LangiumDocument<AstNode>, params: DocumentSymbolParams, cancelToken?: CancellationToken): MaybePromise<DocumentSymbol[]>;
}

Implemented by

Methods

Methods

  • Handle a document symbols request.

    Parameters

    • document: LangiumDocument<AstNode>

      The document in the workspace.

    • params: DocumentSymbolParams

      The parameters of the request.

    • OptionalcancelToken: CancellationToken

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

    Returns MaybePromise<DocumentSymbol[]>

    The symbols for the given document.

    OperationCancelled if cancellation is detected during execution

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