Langium - v4.0.0
    Preparing search index...

    Interface RenameProvider

    Language-specific service for handling rename requests and prepare rename requests.

    interface RenameProvider {
        prepareRename(
            document: LangiumDocument,
            params: TextDocumentPositionParams,
            cancelToken?: Cancellation.CancellationToken,
        ): MaybePromise<undefined | Range>;
        rename(
            document: LangiumDocument,
            params: RenameParams,
            cancelToken?: Cancellation.CancellationToken,
        ): MaybePromise<undefined | WorkspaceEdit>;
    }

    Implemented by

    Index

    Methods

    • Handle a prepare rename request.

      Parameters

      • document: LangiumDocument

        The document in which the prepare rename request was triggered.

      • params: TextDocumentPositionParams

        The prepare rename parameters.

      • OptionalcancelToken: Cancellation.CancellationToken

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

      Returns MaybePromise<undefined | Range>

      A range that describes the range of the symbol to be renamed.

      OperationCancelled if cancellation is detected during execution

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