mirror of
https://github.com/apple/sourcekit-lsp.git
synced 2026-03-02 18:23:24 +01:00
[lsp] Document the logMessage notification and split into its own file
This commit is contained in:
31
Sources/LanguageServerProtocol/LogMessage.swift
Normal file
31
Sources/LanguageServerProtocol/LogMessage.swift
Normal file
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user