Skip to content

Commit c699da9

Browse files
authored
Merge pull request #1112 from ahoppen/ahoppen/test-capabilities
Report whether sourcekit-lsp supports the `workspace/tests` and `textDocument/tests` requests
2 parents 4d3b507 + 5e2fc40 commit c699da9

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Sources/LanguageServerProtocol/Requests/DocumentTestsRequest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
///
1515
/// **(LSP Extension)**
1616
public struct DocumentTestsRequest: TextDocumentRequest, Hashable {
17-
public static let method: String = "document/tests"
17+
public static let method: String = "textDocument/tests"
1818
public typealias Response = [WorkspaceSymbolItem]?
1919

2020
public var textDocument: TextDocumentIdentifier

Sources/SourceKitLSP/SourceKitServer.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1296,7 +1296,11 @@ extension SourceKitServer {
12961296
callHierarchyProvider: .bool(true),
12971297
typeHierarchyProvider: .bool(true),
12981298
semanticTokensProvider: semanticTokensOptions,
1299-
inlayHintProvider: inlayHintOptions
1299+
inlayHintProvider: inlayHintOptions,
1300+
experimental: .dictionary([
1301+
"workspace/tests": .dictionary(["version": .int(1)]),
1302+
"textDocument/tests": .dictionary(["version": .int(1)]),
1303+
])
13001304
)
13011305
}
13021306

0 commit comments

Comments
 (0)