Skip to content

Commit ba53b2e

Browse files
committed
Re-add check for textDocumentContent capability
Once the request is upstreamed to LSP 3.18 we should relax this condition to support clients that don't declare it as an experimental capability (since it will become a standard LSP request).
1 parent af99d89 commit ba53b2e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"lldb.library": "/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/LLDB",
3+
"lldb.launch.expressions": "native"
4+
}

Sources/SourceKitLSP/Swift/MacroExpansion.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ extension SwiftLanguageService {
218218
}
219219

220220
if case .dictionary(let experimentalCapabilities) = self.capabilityRegistry.clientCapabilities.experimental,
221-
case .bool(true) = experimentalCapabilities["workspace/peekDocuments"]
222-
// TODO: Check if client supports LSP 3.18's workspace/textDocumentContent
221+
case .bool(true) = experimentalCapabilities["workspace/peekDocuments"],
222+
case .bool(true) = experimentalCapabilities["workspace/textDocumentContent"]
223223
{
224224
let expansionURIs = try macroExpansionReferenceDocumentURLs.map {
225225
return DocumentURI(try $0.url)

0 commit comments

Comments
 (0)