Skip to content

Commit 4ae360c

Browse files
authored
Merge pull request #2043 from ahoppen/swiftformat-stdin
Add `-` to `swift-format` invocation to indicate that file contents should be read from stdin
2 parents a3c9cfd + 698b384 commit 4ae360c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sources/SourceKitLSP/Swift/DocumentFormatting.swift

Lines changed: 1 addition & 0 deletions
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)