Skip to content

Commit

Permalink
Fix typos (ChimeHQ#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
qmoya authored Feb 18, 2023
1 parent 1e9d4d3 commit 712bdc7
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 72 deletions.
6 changes: 3 additions & 3 deletions Sources/LanguageServerProtocol/JSONRPCLanguageServer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ extension JSONRPCLanguageServer {
sendRequestWithHandler(params, method: method, handler: completionHandler)
case .codeLensResolve(let params):
sendRequestWithHandler(params, method: method, handler: completionHandler)
case .prepareCallHeirarchy(let params):
case .prepareCallHierarchy(let params):
sendRequestWithHandler(params, method: method, handler: completionHandler)
case .prepareRename(let params):
sendRequestWithHandler(params, method: method, handler: completionHandler)
Expand Down Expand Up @@ -411,9 +411,9 @@ extension JSONRPCLanguageServer {
sendRequestWithHandler(params, method: method, handler: completionHandler)
case .workspaceWillDeleteFiles(let params):
sendRequestWithHandler(params, method: method, handler: completionHandler)
case .callHeirarchyIncomingCalls(let params):
case .callHierarchyIncomingCalls(let params):
sendRequestWithHandler(params, method: method, handler: completionHandler)
case .callHeirarchyOutgoingCalls(let params):
case .callHierarchyOutgoingCalls(let params):
sendRequestWithHandler(params, method: method, handler: completionHandler)
case .custom(let method, let params):
sendRequestWithHandler(params, method: method, handler: completionHandler)
Expand Down
24 changes: 12 additions & 12 deletions Sources/LanguageServerProtocol/LanguageServerProtocol.swift
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public enum ClientRequest {
case textDocumentOnTypeFormatting = "textDocument/onTypeFormatting"
case textDocumentRename = "textDocument/rename"
case textDocumentPrepareRename = "textDocument/prepareRename"
case textDocumentPrepareCallHeirarchy = "textDocument/prepareCallHierarchy"
case textDocumentPrepareCallHierarchy = "textDocument/prepareCallHierarchy"
case textDocumentFoldingRange = "textDocument/foldingRange"
case textDocumentSelectionRange = "textDocument/selectionRange"
case textDocumentLinkedEditingRange = "textDocument/linkedEditingRange"
Expand All @@ -120,8 +120,8 @@ public enum ClientRequest {
case textDocumentSemanticTokensFull = "textDocument/semanticTokens/full"
case textDocumentSemanticTokensFullDelta = "textDocument/semanticTokens/full/delta"
case textDocumentMoniker = "textDocument/moniker"
case callHeirarchyIncomingCalls = "callHierarchy/incomingCalls"
case callHeirarchyOutgoingCalls = "callHierarchy/outgoingCalls"
case callHierarchyIncomingCalls = "callHierarchy/incomingCalls"
case callHierarchyOutgoingCalls = "callHierarchy/outgoingCalls"
case custom
}

Expand All @@ -148,7 +148,7 @@ public enum ClientRequest {
case codeLens(CodeLensParams)
case codeLensResolve(CodeLens)
case selectionRange(SelectionRangeParams)
case prepareCallHeirarchy(CallHierarchyPrepareParams)
case prepareCallHierarchy(CallHierarchyPrepareParams)
case prepareRename(PrepareRenameParams)
case rename(RenameParams)
case documentLink(DocumentLinkParams)
Expand All @@ -163,8 +163,8 @@ public enum ClientRequest {
case semanticTokensFull(SemanticTokensParams)
case semanticTokensFullDelta(SemanticTokensDeltaParams)
case semanticTokensRange(SemanticTokensRangeParams)
case callHeirarchyIncomingCalls(CallHierarchyIncomingCallsParams)
case callHeirarchyOutgoingCalls(CallHierarchyOutgoingCallsParams)
case callHierarchyIncomingCalls(CallHierarchyIncomingCallsParams)
case callHierarchyOutgoingCalls(CallHierarchyOutgoingCallsParams)
case custom(String, LSPAny)

public var method: Method {
Expand Down Expand Up @@ -215,8 +215,8 @@ public enum ClientRequest {
return .codeLensResolve
case .selectionRange:
return .textDocumentSelectionRange
case .prepareCallHeirarchy:
return .textDocumentPrepareCallHeirarchy
case .prepareCallHierarchy:
return .textDocumentPrepareCallHierarchy
case .prepareRename:
return .textDocumentPrepareRename
case .rename:
Expand Down Expand Up @@ -245,10 +245,10 @@ public enum ClientRequest {
return .textDocumentSemanticTokensFullDelta
case .semanticTokensRange:
return .textDocumentSemanticTokensRange
case .callHeirarchyIncomingCalls:
return .callHeirarchyIncomingCalls
case .callHeirarchyOutgoingCalls:
return .callHeirarchyOutgoingCalls
case .callHierarchyIncomingCalls:
return .callHierarchyIncomingCalls
case .callHierarchyOutgoingCalls:
return .callHierarchyOutgoingCalls
case .custom:
return .custom
}
Expand Down
114 changes: 57 additions & 57 deletions Sources/LanguageServerProtocol/Server.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ public extension Server {
}

func sendRequest<Response: Codable>(_ request: ClientRequest) async throws -> Response {
return try await withCheckedThrowingContinuation { continutation in
return try await withCheckedThrowingContinuation { continuation in
self.sendRequest(request) { result in
continutation.resume(with: result)
continuation.resume(with: result)
}
}
}
Expand All @@ -109,9 +109,9 @@ public extension Server {
public extension Server {
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
func initialize(params: InitializeParams) async throws -> InitializationResponse {
return try await withCheckedThrowingContinuation { continutation in
return try await withCheckedThrowingContinuation { continuation in
self.initialize(params: params) { result in
continutation.resume(with: result)
continuation.resume(with: result)
}
}
}
Expand Down Expand Up @@ -161,12 +161,12 @@ public extension Server {

@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
func didOpenTextDocument(params: DidOpenTextDocumentParams) async throws {
try await withCheckedThrowingContinuation { (continutation: CheckedContinuation<Void, Error>) in
try await withCheckedThrowingContinuation { (continuation: CheckedContinuation<Void, Error>) in
self.didOpenTextDocument(params: params) { error in
if let error = error {
continutation.resume(throwing: error)
continuation.resume(throwing: error)
} else {
continutation.resume()
continuation.resume()
}
}
}
Expand All @@ -178,12 +178,12 @@ public extension Server {

@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
func didChangeTextDocument(params: DidChangeTextDocumentParams) async throws {
try await withCheckedThrowingContinuation { (continutation: CheckedContinuation<Void, Error>) in
try await withCheckedThrowingContinuation { (continuation: CheckedContinuation<Void, Error>) in
self.didChangeTextDocument(params: params) { error in
if let error = error {
continutation.resume(throwing: error)
continuation.resume(throwing: error)
} else {
continutation.resume()
continuation.resume()
}
}
}
Expand All @@ -195,12 +195,12 @@ public extension Server {

@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
func didCloseTextDocument(params: DidCloseTextDocumentParams) async throws {
try await withCheckedThrowingContinuation { (continutation: CheckedContinuation<Void, Error>) in
try await withCheckedThrowingContinuation { (continuation: CheckedContinuation<Void, Error>) in
self.didCloseTextDocument(params: params) { error in
if let error = error {
continutation.resume(throwing: error)
continuation.resume(throwing: error)
} else {
continutation.resume()
continuation.resume()
}
}
}
Expand All @@ -212,12 +212,12 @@ public extension Server {

@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
func willSaveTextDocument(params: WillSaveTextDocumentParams) async throws {
try await withCheckedThrowingContinuation { (continutation: CheckedContinuation<Void, Error>) in
try await withCheckedThrowingContinuation { (continuation: CheckedContinuation<Void, Error>) in
self.willSaveTextDocument(params: params) { error in
if let error = error {
continutation.resume(throwing: error)
continuation.resume(throwing: error)
} else {
continutation.resume()
continuation.resume()
}
}
}
Expand All @@ -233,12 +233,12 @@ public extension Server {

@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
func didSaveTextDocument(params: DidSaveTextDocumentParams) async throws {
try await withCheckedThrowingContinuation { (continutation: CheckedContinuation<Void, Error>) in
try await withCheckedThrowingContinuation { (continuation: CheckedContinuation<Void, Error>) in
self.didSaveTextDocument(params: params) { error in
if let error = error {
continutation.resume(throwing: error)
continuation.resume(throwing: error)
} else {
continutation.resume()
continuation.resume()
}
}
}
Expand All @@ -250,39 +250,39 @@ public extension Server {

@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
func didChangeWatchedFiles(params: DidChangeWatchedFilesParams) async throws {
try await withCheckedThrowingContinuation { (continutation: CheckedContinuation<Void, Error>) in
try await withCheckedThrowingContinuation { (continuation: CheckedContinuation<Void, Error>) in
self.didChangeWatchedFiles(params: params) { error in
if let error = error {
continutation.resume(throwing: error)
continuation.resume(throwing: error)
} else {
continutation.resume()
continuation.resume()
}
}
}
}

func callHeirarchyIncomingCalls(params: CallHierarchyIncomingCallsParams, block: @escaping (ServerResult<CallHierarchyIncomingCallsResponse>) -> Void) {
sendRequest(.callHeirarchyIncomingCalls(params), completionHandler: block)
func callHierarchyIncomingCalls(params: CallHierarchyIncomingCallsParams, block: @escaping (ServerResult<CallHierarchyIncomingCallsResponse>) -> Void) {
sendRequest(.callHierarchyIncomingCalls(params), completionHandler: block)
}

@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
func completion(params: CallHierarchyIncomingCallsParams) async throws -> CallHierarchyIncomingCallsResponse {
try await withCheckedThrowingContinuation { continutation in
self.callHeirarchyIncomingCalls(params: params) { result in
continutation.resume(with: result)
try await withCheckedThrowingContinuation { continuation in
self.callHierarchyIncomingCalls(params: params) { result in
continuation.resume(with: result)
}
}
}

func callHeirarchyOutgoingCalls(params: CallHierarchyOutgoingCallsParams, block: @escaping (ServerResult<CallHierarchyOutgoingCallsResponse>) -> Void) {
sendRequest(.callHeirarchyOutgoingCalls(params), completionHandler: block)
func callHierarchyOutgoingCalls(params: CallHierarchyOutgoingCallsParams, block: @escaping (ServerResult<CallHierarchyOutgoingCallsResponse>) -> Void) {
sendRequest(.callHierarchyOutgoingCalls(params), completionHandler: block)
}

@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
func callHeirarchyOutgoingCalls(params: CallHierarchyOutgoingCallsParams) async throws -> CallHierarchyOutgoingCallsResponse {
try await withCheckedThrowingContinuation { continutation in
self.callHeirarchyOutgoingCalls(params: params) { result in
continutation.resume(with: result)
func callHierarchyOutgoingCalls(params: CallHierarchyOutgoingCallsParams) async throws -> CallHierarchyOutgoingCallsResponse {
try await withCheckedThrowingContinuation { continuation in
self.callHierarchyOutgoingCalls(params: params) { result in
continuation.resume(with: result)
}
}
}
Expand All @@ -293,9 +293,9 @@ public extension Server {

@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
func completion(params: CompletionParams) async throws -> CompletionResponse {
try await withCheckedThrowingContinuation { continutation in
try await withCheckedThrowingContinuation { continuation in
self.completion(params: params) { result in
continutation.resume(with: result)
continuation.resume(with: result)
}
}
}
Expand All @@ -306,9 +306,9 @@ public extension Server {

@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
func hover(params: TextDocumentPositionParams) async throws -> HoverResponse {
try await withCheckedThrowingContinuation { continutation in
try await withCheckedThrowingContinuation { continuation in
self.hover(params: params) { result in
continutation.resume(with: result)
continuation.resume(with: result)
}
}
}
Expand All @@ -327,9 +327,9 @@ public extension Server {

@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
func definition(params: TextDocumentPositionParams) async throws -> DefinitionResponse {
try await withCheckedThrowingContinuation { continutation in
try await withCheckedThrowingContinuation { continuation in
self.definition(params: params) { result in
continutation.resume(with: result)
continuation.resume(with: result)
}
}
}
Expand All @@ -352,22 +352,22 @@ public extension Server {

@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
func codeAction(params: CodeActionParams) async throws -> CodeActionResponse {
try await withCheckedThrowingContinuation { continutation in
try await withCheckedThrowingContinuation { continuation in
codeAction(params: params) { result in
continutation.resume(with: result)
continuation.resume(with: result)
}
}
}

func prepareCallHeirarchy(params: CallHierarchyPrepareParams, block: @escaping (ServerResult<CallHierarchyPrepareResponse>) -> Void) {
sendRequest(.prepareCallHeirarchy(params), completionHandler: block)
func prepareCallHierarchy(params: CallHierarchyPrepareParams, block: @escaping (ServerResult<CallHierarchyPrepareResponse>) -> Void) {
sendRequest(.prepareCallHierarchy(params), completionHandler: block)
}

@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
func prepareCallHeirarchy(params: CallHierarchyPrepareParams) async throws -> CallHierarchyPrepareResponse {
try await withCheckedThrowingContinuation { continutation in
prepareCallHeirarchy(params: params) { result in
continutation.resume(with: result)
func prepareCallHierarchy(params: CallHierarchyPrepareParams) async throws -> CallHierarchyPrepareResponse {
try await withCheckedThrowingContinuation { continuation in
prepareCallHierarchy(params: params) { result in
continuation.resume(with: result)
}
}
}
Expand All @@ -386,9 +386,9 @@ public extension Server {

@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
func formatting(params: DocumentFormattingParams) async throws -> FormattingResult {
try await withCheckedThrowingContinuation { continutation in
try await withCheckedThrowingContinuation { continuation in
self.formatting(params: params) { result in
continutation.resume(with: result)
continuation.resume(with: result)
}
}
}
Expand All @@ -415,9 +415,9 @@ public extension Server {

@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
func semanticTokensFull(params: SemanticTokensParams) async throws -> SemanticTokensResponse {
try await withCheckedThrowingContinuation { continutation in
try await withCheckedThrowingContinuation { continuation in
self.semanticTokensFull(params: params) { result in
continutation.resume(with: result)
continuation.resume(with: result)
}
}
}
Expand All @@ -428,9 +428,9 @@ public extension Server {

@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
func semanticTokensFullDelta(params: SemanticTokensDeltaParams) async throws -> SemanticTokensDeltaResponse {
try await withCheckedThrowingContinuation { continutation in
try await withCheckedThrowingContinuation { continuation in
self.semanticTokensFullDelta(params: params) { result in
continutation.resume(with: result)
continuation.resume(with: result)
}
}
}
Expand All @@ -441,9 +441,9 @@ public extension Server {

@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
func semanticTokensRange(params: SemanticTokensRangeParams) async throws -> SemanticTokensResponse {
try await withCheckedThrowingContinuation { continutation in
try await withCheckedThrowingContinuation { continuation in
self.semanticTokensRange(params: params) { result in
continutation.resume(with: result)
continuation.resume(with: result)
}
}
}
Expand Down Expand Up @@ -500,9 +500,9 @@ public extension Server {

@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
func workspaceSymbol(params: WorkspaceSymbolParams) async throws -> WorkspaceSymbolResponse {
try await withCheckedThrowingContinuation { continutation in
try await withCheckedThrowingContinuation { continuation in
self.workspaceSymbol(params: params) { result in
continutation.resume(with: result)
continuation.resume(with: result)
}
}
}
Expand Down

0 comments on commit 712bdc7

Please sign in to comment.