Skip to content

Commit 066c385

Browse files
committed
Add TextDocumentContentOptions to WorkspaceServerCapabilities
1 parent fd417c7 commit 066c385

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

Sources/LanguageServerProtocol/SupportTypes/ServerCapabilities.swift

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1219,10 +1219,27 @@ public struct WorkspaceServerCapabilities: Codable, Hashable, Sendable {
12191219
public var willDelete: FileOperationRegistrationOptions?
12201220
}
12211221

1222+
/// Text document content provider options.
1223+
public struct TextDocumentContentOptions: Codable, Hashable, Sendable {
1224+
/// The schemes for which the server provides content.
1225+
public var schemes: [String]
1226+
1227+
public init(schemes: [String] = []) {
1228+
self.schemes = schemes
1229+
}
1230+
}
1231+
12221232
/// The server supports workspace folder.
12231233
public var workspaceFolders: WorkspaceFolders?
12241234

1225-
public init(workspaceFolders: WorkspaceFolders? = nil) {
1235+
/// The server supports the `workspace/textDocumentContent` request`.
1236+
public var textDocumentContent: TextDocumentContentOptions?
1237+
1238+
public init(
1239+
workspaceFolders: WorkspaceFolders? = nil,
1240+
textDocumentContent: TextDocumentContentOptions? = nil
1241+
) {
12261242
self.workspaceFolders = workspaceFolders
1243+
self.textDocumentContent = textDocumentContent
12271244
}
12281245
}

0 commit comments

Comments
 (0)