We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7ed2c8 commit fbf8b48Copy full SHA for fbf8b48
Sources/SwiftLanguageService/SwiftCodeLensScanner.swift
@@ -73,7 +73,7 @@ final class SwiftCodeLensScanner: SyntaxVisitor {
73
// "swift.play" CodeLens should be ignored if "swift-play" is not in the toolchain as the client has no way of running
74
if toolchain.swiftPlay != nil, let workspace, let playCommand = supportedCommands[SupportedCodeLensCommand.play], snapshot.text.contains("#Playground") {
75
let playgrounds = await SwiftPlaygroundsScanner.findDocumentPlaygrounds(in: syntaxTree, workspace: workspace, snapshot: snapshot)
76
- codeLenses += playgrounds.map({ p in CodeLens(range: p.range, command: Command(title: "Play \"\(p.label ?? p.id)\"", command: playCommand, arguments: [p.encodeToLSPAny()])) })
+ codeLenses += playgrounds.map({ CodeLens(range: $0.range, command: Command(title: "Play \"\($0.label ?? $0.id)\"", command: playCommand, arguments: [$0.encodeToLSPAny()])) })
77
}
78
79
return codeLenses
0 commit comments