Skip to content

Commit 386036c

Browse files
authored
Inform LSP of supported code lenses (swiftlang#973)
Provide the LSP with a mapping of supported code lenses to commands. SourceKit-LSP will provide code lenses for running and debugging applications with a @main function only when we configure the commands we support. Blocked by swiftlang/sourcekit-lsp#1556
1 parent f7a1c76 commit 386036c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/sourcekit-lsp/LanguageClientManager.ts

+6
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,12 @@ export class LanguageClientManager {
566566
errorHandler: new SourceKitLSPErrorHandler(5),
567567
initializationOptions: {
568568
"workspace/peekDocuments": true, // workaround for client capability to handle `PeekDocumentsRequest`
569+
"textDocument/codeLens": {
570+
supportedCommands: {
571+
"swift.run": "swift.run",
572+
"swift.debug": "swift.debug",
573+
},
574+
},
569575
},
570576
};
571577

0 commit comments

Comments
 (0)