Skip to content

Commit 3e01a5c

Browse files
authored
Merge pull request #1741 from plemarquand/fix-lsp-init-shadowing
Fix inadvertent shadowing of ClientCapabilities subtypes
2 parents dd95a3d + d8b0577 commit 3e01a5c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Sources/LanguageServerProtocol/SupportTypes/ClientCapabilities.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ public struct TextDocumentClientCapabilities: Hashable, Codable, Sendable {
289289
}
290290

291291
/// Capabilities specific to `CompletionItemKind`.
292-
public struct CompletionItemKind: Hashable, Codable, Sendable {
292+
public struct CompletionItemKindValueSet: Hashable, Codable, Sendable {
293293

294294
/// The completion kind values that the client can support.
295295
///
@@ -310,15 +310,15 @@ public struct TextDocumentClientCapabilities: Hashable, Codable, Sendable {
310310

311311
public var completionItem: CompletionItem? = nil
312312

313-
public var completionItemKind: CompletionItemKind? = nil
313+
public var completionItemKind: CompletionItemKindValueSet? = nil
314314

315315
/// Whether the client supports sending context information in a `textDocument/completion` request.
316316
public var contextSupport: Bool? = nil
317317

318318
public init(
319319
dynamicRegistration: Bool? = nil,
320320
completionItem: CompletionItem? = nil,
321-
completionItemKind: CompletionItemKind? = nil,
321+
completionItemKind: CompletionItemKindValueSet? = nil,
322322
contextSupport: Bool? = nil
323323
) {
324324
self.dynamicRegistration = dynamicRegistration
@@ -383,7 +383,7 @@ public struct TextDocumentClientCapabilities: Hashable, Codable, Sendable {
383383
public struct DocumentSymbol: Hashable, Codable, Sendable {
384384

385385
/// Capabilities specific to `SymbolKind`.
386-
public struct SymbolKind: Hashable, Codable, Sendable {
386+
public struct SymbolKindValueSet: Hashable, Codable, Sendable {
387387

388388
/// The symbol kind values that the client can support.
389389
///
@@ -400,13 +400,13 @@ public struct TextDocumentClientCapabilities: Hashable, Codable, Sendable {
400400
/// Whether the client supports dynamic registration of this request.
401401
public var dynamicRegistration: Bool? = nil
402402

403-
public var symbolKind: SymbolKind? = nil
403+
public var symbolKind: SymbolKindValueSet? = nil
404404

405405
public var hierarchicalDocumentSymbolSupport: Bool? = nil
406406

407407
public init(
408408
dynamicRegistration: Bool? = nil,
409-
symbolKind: SymbolKind? = nil,
409+
symbolKind: SymbolKindValueSet? = nil,
410410
hierarchicalDocumentSymbolSupport: Bool? = nil
411411
) {
412412
self.dynamicRegistration = dynamicRegistration

0 commit comments

Comments
 (0)