Skip to content

Commit 698b384

Browse files
committed
Add - to swift-format invocation to indicate that file contents should be read from stdin
To match swiftlang/swift-format#914
1 parent a3c9cfd commit 698b384

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sources/SourceKitLSP/Swift/DocumentFormatting.swift

+1
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ extension SwiftLanguageService {
190190
var args = try [
191191
swiftFormat.filePath,
192192
"format",
193+
"-", // Read file contents from stdin
193194
"--configuration",
194195
swiftFormatConfiguration(for: textDocument.uri, options: options),
195196
]

0 commit comments

Comments
 (0)