import { Connection, TextDocuments, DocumentFormattingParams, DocumentRangeFormattingParams, TextEdit, TextDocumentSaveReason } from "vscode-languageserver/node";
import { TextDocument } from "vscode-languageserver-textdocument";
import { Project } from "./project";
import { Settings } from "./settings";
import { Config } from "@herb-tools/config";
export declare class FormattingService {
    private connection;
    private documents;
    private project;
    private settings;
    private config?;
    private preRewriters;
    private postRewriters;
    private failedRewriters;
    constructor(connection: Connection, documents: TextDocuments<TextDocument>, project: Project, settings: Settings);
    initialize(): Promise<void>;
    refreshConfig(config?: Config): Promise<void>;
    private loadConfiguredRewriters;
    formatOnSave(document: TextDocument, reason: TextDocumentSaveReason): Promise<TextEdit[]>;
    private shouldFormatFile;
    private getConfigWithSettings;
    private performFormatting;
    formatDocument(params: DocumentFormattingParams): Promise<TextEdit[]>;
    formatDocumentIgnoreConfig(params: DocumentFormattingParams): Promise<TextEdit[]>;
    private performRangeFormatting;
    formatRange(params: DocumentRangeFormattingParams): Promise<TextEdit[]>;
    formatRangeIgnoreConfig(params: DocumentRangeFormattingParams): Promise<TextEdit[]>;
}
