Langium - v4.0.0
    Preparing search index...

    Interface Formatter

    Language specific service for handling formatting related LSP requests.

    interface Formatter {
        get formatOnTypeOptions(): undefined | DocumentOnTypeFormattingOptions;
        formatDocument(
            document: LangiumDocument,
            params: DocumentFormattingParams,
            cancelToken?: Cancellation.CancellationToken,
        ): MaybePromise<TextEdit[]>;
        formatDocumentOnType(
            document: LangiumDocument,
            params: DocumentOnTypeFormattingParams,
            cancelToken?: Cancellation.CancellationToken,
        ): MaybePromise<TextEdit[]>;
        formatDocumentRange(
            document: LangiumDocument,
            params: DocumentRangeFormattingParams,
            cancelToken?: Cancellation.CancellationToken,
        ): MaybePromise<TextEdit[]>;
    }

    Implemented by

    Index

    Accessors

    • get formatOnTypeOptions(): undefined | DocumentOnTypeFormattingOptions

      Options that determine when the formatDocumentOnType method should be invoked by the language client. When undefined is returned, document format on type will be disabled.

      Returns undefined | DocumentOnTypeFormattingOptions

    Methods