Langium - v4.0.0
    Preparing search index...

    Interface DefinitionProvider

    Language-specific service for handling go to definition requests.

    interface DefinitionProvider {
        getDefinition(
            document: LangiumDocument,
            params: DefinitionParams,
            cancelToken?: Cancellation.CancellationToken,
        ): MaybePromise<undefined | LocationLink[]>;
    }

    Implemented by

    Index

    Methods

    • Handle a go to definition request.

      Parameters

      • document: LangiumDocument

        The document in which the request was triggered.

      • params: DefinitionParams

        The parameters of the request.

      • OptionalcancelToken: Cancellation.CancellationToken

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

      Returns MaybePromise<undefined | LocationLink[]>

      A list of location links to the definition(s) of the symbol at the given position.

      OperationCancelled if cancellation is detected during execution

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