diff --git a/Sources/LanguageServerProtocol/LogMessage.swift b/Sources/LanguageServerProtocol/LogMessage.swift new file mode 100644 index 00000000..192e55ef --- /dev/null +++ b/Sources/LanguageServerProtocol/LogMessage.swift @@ -0,0 +1,31 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + +/// Notifcation from the server containing a log message. +/// +/// - Parameters: +/// - type: The kind of log message. +/// - message: The contents of the message. +public struct LogMessage: NotificationType, Hashable { + public static let method: String = "window/logMessage" + + /// The kind of log message. + public var type: WindowMessageType + + /// The contents of the message. + public var message: String + + public init(type: WindowMessageType, message: String) { + self.type = type + self.message = message + } +} \ No newline at end of file diff --git a/Sources/LanguageServerProtocol/Messages.swift b/Sources/LanguageServerProtocol/Messages.swift index 7e3d60bc..99706a92 100644 --- a/Sources/LanguageServerProtocol/Messages.swift +++ b/Sources/LanguageServerProtocol/Messages.swift @@ -159,21 +159,6 @@ public struct Exit: NotificationType, Hashable { public static let method: String = "exit" } -// MARK: - Window - - -public struct LogMessage: NotificationType, Hashable { - public static let method: String = "window/logMessage" - - public var type: WindowMessageType - - public var message: String - - public init(type: WindowMessageType, message: String) { - self.type = type - self.message = message - } -} - public protocol TextDocumentRequest: RequestType { var textDocument: TextDocumentIdentifier { get }