Skip to content

Commit

Permalink
add canImport check around SourceKitLSPServer.doccDocumentation(_:)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewbastien committed Jan 16, 2025
1 parent 3842f88 commit bb636b6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Sources/SourceKitLSP/SourceKitLSPServer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1397,12 +1397,14 @@ extension SourceKitLSPServer {
return try await languageService.completion(req)
}

#if canImport(SwiftDocC)
func doccDocumentation(_ req: DoccDocumentationRequest) async throws -> DoccDocumentationResponse {
return try await documentationManager.convertDocumentation(
req.textDocument.uri,
at: req.position
)
}
#endif

func hover(
_ req: HoverRequest,
Expand Down

0 comments on commit bb636b6

Please sign in to comment.