diff --git a/Sources/LanguageServerProtocol/Client.swift b/Sources/LanguageServerProtocol/Client.swift index 69c1f5a..d2be4e1 100644 --- a/Sources/LanguageServerProtocol/Client.swift +++ b/Sources/LanguageServerProtocol/Client.swift @@ -29,9 +29,9 @@ extension Registration { return .workspaceDidChangeWatchedFiles(options) case .workspaceDidChangeConfiguration: - throw ServerError.unhandledMethod(method) + return .workspaceDidChangeConfiguration case .workspaceDidChangeWorkspaceFolders: - throw ServerError.unhandledMethod(method) + return .workspaceDidChangeWorkspaceFolders case .textDocumentSemanticTokens: let options = try reintrepretOptions(SemanticTokensRegistrationOptions.self) diff --git a/Sources/LanguageServerProtocol/LanguageServerProtocol.swift b/Sources/LanguageServerProtocol/LanguageServerProtocol.swift index 2a9b796..444b40b 100644 --- a/Sources/LanguageServerProtocol/LanguageServerProtocol.swift +++ b/Sources/LanguageServerProtocol/LanguageServerProtocol.swift @@ -221,6 +221,8 @@ public enum ServerRegistration { case workspaceDidChangeWatchedFiles(DidChangeWatchedFilesRegistrationOptions) case textDocumentSemanticTokens(SemanticTokensRegistrationOptions) + case workspaceDidChangeConfiguration + case workspaceDidChangeWorkspaceFolders public var method: Method { switch self { @@ -228,6 +230,10 @@ public enum ServerRegistration { return .workspaceDidChangeWatchedFiles case .textDocumentSemanticTokens: return .textDocumentSemanticTokens + case .workspaceDidChangeConfiguration: + return .workspaceDidChangeConfiguration + case .workspaceDidChangeWorkspaceFolders: + return .workspaceDidChangeWorkspaceFolders } } }