@Override
    public CompletableFuture<List<? extends TextEdit>> formatting(DocumentFormattingParams params) {
        return CompletableFutures.computeAsync((cancelChecker) -> {
            try {
                EventFormattingContext context = eventContextCreator.createContext(params);
                return SchemaFormatting.computeFormattingEdits(context);
            } catch (InvalidContextException ignore) {
            }
            return List.of();
        });
    }
SchemaTextDocumentService handles incomming requests from the client.
integration/schema-language-server/language-server/src/main/java/ai/vespa/schemals/SchemaTextDocumentService.java