diff --git a/Sources/SourceKitLSP/Swift/DocumentFormatting.swift b/Sources/SourceKitLSP/Swift/DocumentFormatting.swift index 8296dcd59..872f25422 100644 --- a/Sources/SourceKitLSP/Swift/DocumentFormatting.swift +++ b/Sources/SourceKitLSP/Swift/DocumentFormatting.swift @@ -190,6 +190,7 @@ extension SwiftLanguageService { var args = try [ swiftFormat.filePath, "format", + "-", // Read file contents from stdin "--configuration", swiftFormatConfiguration(for: textDocument.uri, options: options), ]