Skip to content

trimmed whitespace #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Sources/LanguageServerProtocol/Connection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ public protocol _IndirectConnection: Connection {

/// An abstract message handler, such as a language server or client.
public protocol MessageHandler: AnyObject {

/// Handle a notification without a reply.
func handle<Notification>(_: Notification, from: ObjectIdentifier) where Notification: NotificationType

/// Handle a request and (asynchronously) receive a reply.
func handle<Request>(_: Request, id: RequestID, from: ObjectIdentifier, reply: @escaping (LSPResult<Request.Response>) -> ()) where Request: RequestType
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/LanguageServerProtocol/DocumentHighlight.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ public struct DocumentHighlight: ResponseType, Hashable {
self.range = range
self.kind = kind
}
}
}
2 changes: 1 addition & 1 deletion Sources/LanguageServerProtocol/ServerCapabilities.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public struct ServerCapabilities: Codable, Hashable {
} else if let kind = try? container.decode(TextDocumentSyncKind.self, forKey: .textDocumentSync) {
// Legacy response
self.textDocumentSync = TextDocumentSyncOptions(openClose: nil, change: kind, willSave: nil, willSaveWaitUntil: nil, save: nil)

} else {
self.textDocumentSync = nil
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/SKCore/ExternalWorkspace.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ public protocol ExternalWorkspace {

/// The path to put the index database, if any.
var indexDatabasePath: AbsolutePath? { get }
}
}
2 changes: 1 addition & 1 deletion Sources/SKSupport/Cancellation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public final class CancellationToken {
public var isCancelled: Bool { return false }

public init() {}

public func addCancellationHandler(_ handler: @escaping () -> ()) {

}
Expand Down
10 changes: 5 additions & 5 deletions Sources/SKSupport/LineTable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public struct LineTable: Hashable {
@inlinable
func nextLineStart(_ line: Int) -> String.Index {
if line == count - 1 {
return content.endIndex
return content.endIndex
} else {
return impl[line + 1].stringIndex
}
Expand Down Expand Up @@ -153,9 +153,9 @@ extension LineTable {
mutating public func replace(
fromLine: Int,
utf16Offset fromOff: Int,
toLine: Int,
utf16Offset toOff: Int,
with replacement: String)
toLine: Int,
utf16Offset toOff: Int,
with replacement: String)
{
let start = String.Index(encodedOffset: self[fromLine].utf16Offset + fromOff)
let end = String.Index(encodedOffset: self[toLine].utf16Offset + toOff)
Expand All @@ -177,7 +177,7 @@ extension LineTable {
fromLine: Int,
utf16Offset fromOff: Int,
utf16Length: Int,
with replacement: String)
with replacement: String)
{
let endOff = self[fromLine].utf16Offset + fromOff + utf16Length
let endLine = self[utf16Offset: endOff]
Expand Down
4 changes: 2 additions & 2 deletions Sources/SKSupport/Random.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ public struct SimpleLCG: RandomNumberGenerator {
public mutating func next() -> UInt64 {
state = state &* 6364136223846793005 &+ 1442695040888963407
return state
}
}
}
}