Skip to content

Commit 9b57635

Browse files
TheAngryByrdbaronfel
authored andcommitted
Fixing spellings
1 parent a9e68a4 commit 9b57635

File tree

3 files changed

+64
-35
lines changed

3 files changed

+64
-35
lines changed

.vscode/settings.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,10 @@
22
"editor.formatOnSave": true,
33
"yaml.schemas": {
44
"https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/github-workflow.json": ".github/workflows/**"
5-
}
5+
},
6+
"cSpell.words": [
7+
"Ionide",
8+
"Newtonsoft",
9+
"Supertypes"
10+
]
611
}

src/LanguageServerProtocol.fs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module Server =
1616

1717
let logger = LogProvider.getLoggerByName "LSP Server"
1818

19-
let defaultJsonRpcFormatter() =
19+
let defaultJsonRpcFormatter () =
2020
let jsonRpcFormatter = new JsonMessageFormatter()
2121
jsonRpcFormatter.JsonSerializer.NullValueHandling <- NullValueHandling.Ignore
2222
jsonRpcFormatter.JsonSerializer.ConstructorHandling <- ConstructorHandling.AllowNonPublicDefaultConstructor
@@ -30,7 +30,7 @@ module Server =
3030
jsonRpcFormatter.JsonSerializer.ContractResolver <- OptionAndCamelCasePropertyNamesContractResolver()
3131
jsonRpcFormatter
3232

33-
let jsonRpcFormatter = defaultJsonRpcFormatter()
33+
let jsonRpcFormatter = defaultJsonRpcFormatter ()
3434

3535
let deserialize<'t> (token: JToken) = token.ToObject<'t>(jsonRpcFormatter.JsonSerializer)
3636
let serialize<'t> (o: 't) = JToken.FromObject(o, jsonRpcFormatter.JsonSerializer)
@@ -99,7 +99,7 @@ module Server =
9999
(customizeRpc: IJsonRpcMessageHandler -> JsonRpc)
100100
=
101101

102-
use jsonRpcHandler = new HeaderDelimitedMessageHandler(output, input, defaultJsonRpcFormatter())
102+
use jsonRpcHandler = new HeaderDelimitedMessageHandler(output, input, defaultJsonRpcFormatter ())
103103
// Without overriding isFatalException, JsonRpc serializes exceptions and sends them to the client.
104104
// This is particularly bad for notifications such as textDocument/didChange which don't require a response,
105105
// and thus any exception that happens during e.g. text sync gets swallowed.
@@ -234,12 +234,12 @@ module Server =
234234
"textDocument/linkedEditingRange", requestHandling (fun s p -> s.TextDocumentLinkedEditingRange(p))
235235
"textDocument/foldingRange", requestHandling (fun s p -> s.TextDocumentFoldingRange(p))
236236
"textDocument/selectionRange", requestHandling (fun s p -> s.TextDocumentSelectionRange(p))
237-
"textDocument/prepareCallHierarchy", requestHandling(fun s p -> s.TextDocumentPrepareCallHierarchy(p))
238-
"callHierarchy/incomingCalls", requestHandling(fun s p -> s.CallHierarchyIncomingCalls(p))
239-
"callHierarchy/outgoingCalls", requestHandling(fun s p -> s.CallHierarchyOutgoingCalls(p))
240-
"textDocument/prepareTypeHierarchy", requestHandling(fun s p -> s.TextDocumentPrepareTypeHierarchy(p))
241-
"typeHierarchy/supertypes", requestHandling(fun s p -> s.TypeHierarchySupertypes(p))
242-
"typeHierarchy/subtypes", requestHandling(fun s p -> s.TypeHierarchySubtypes(p))
237+
"textDocument/prepareCallHierarchy", requestHandling (fun s p -> s.TextDocumentPrepareCallHierarchy(p))
238+
"callHierarchy/incomingCalls", requestHandling (fun s p -> s.CallHierarchyIncomingCalls(p))
239+
"callHierarchy/outgoingCalls", requestHandling (fun s p -> s.CallHierarchyOutgoingCalls(p))
240+
"textDocument/prepareTypeHierarchy", requestHandling (fun s p -> s.TextDocumentPrepareTypeHierarchy(p))
241+
"typeHierarchy/supertypes", requestHandling (fun s p -> s.TypeHierarchySupertypes(p))
242+
"typeHierarchy/subtypes", requestHandling (fun s p -> s.TypeHierarchySubtypes(p))
243243
"textDocument/semanticTokens/full", requestHandling (fun s p -> s.TextDocumentSemanticTokensFull(p))
244244
"textDocument/semanticTokens/full/delta", requestHandling (fun s p -> s.TextDocumentSemanticTokensFullDelta(p))
245245
"textDocument/semanticTokens/range", requestHandling (fun s p -> s.TextDocumentSemanticTokensRange(p))
@@ -264,7 +264,7 @@ module Server =
264264
"workspace/symbol", requestHandling (fun s p -> s.WorkspaceSymbol(p))
265265
"workspaceSymbol/resolve", requestHandling (fun s p -> s.WorkspaceSymbolResolve(p))
266266
"workspace/executeCommand", requestHandling (fun s p -> s.WorkspaceExecuteCommand(p))
267-
"window/workDoneProgress/cancel", requestHandling (fun s p -> s.WorkDoneProgessCancel(p) |> notificationSuccess)
267+
"window/workDoneProgress/cancel", requestHandling (fun s p -> s.WorkDoneProgressCancel(p) |> notificationSuccess)
268268
"workspace/diagnostic", requestHandling (fun s p -> s.WorkspaceDiagnostic(p))
269269
"shutdown", requestHandling (fun s () -> s.Shutdown() |> notificationSuccess)
270270
"exit", requestHandling (fun s () -> s.Exit() |> notificationSuccess) ]

src/Server.fs

Lines changed: 48 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ type ILspServer =
8383

8484

8585
/// The go to declaration request is sent from the client to the server to resolve the declaration location
86-
/// of a synbol at a given text document position
86+
/// of a symbol at a given text document position
8787
abstract member TextDocumentDeclaration: TextDocumentPositionParams -> AsyncLspResult<GotoResult option>
8888

8989
/// The goto definition request is sent from the client to the server to resolve the definition location of
@@ -199,7 +199,8 @@ type ILspServer =
199199
/// returned to describe valid contents. A rename to one of the ranges can be applied to all other ranges if the new
200200
/// content is valid. If no result-specific word pattern is provided, the word pattern from the client’s language
201201
/// configuration is used.
202-
abstract member TextDocumentLinkedEditingRange: TextDocumentPositionParams -> AsyncLspResult<LinkedEditingRanges option>
202+
abstract member TextDocumentLinkedEditingRange:
203+
TextDocumentPositionParams -> AsyncLspResult<LinkedEditingRanges option>
203204

204205

205206
/// The watched files notification is sent from the client to the server when the client detects changes
@@ -211,7 +212,7 @@ type ILspServer =
211212

212213
/// The `workspace/didChangeWorkspaceFolders` notification is sent from the client to the server to inform
213214
/// the server about workspace folder configuration changes. The notification is sent by default if both
214-
/// *ServerCapabilities/workspace/workspaceFolders* and *ClientCapabilities/workapce/workspaceFolders* are
215+
/// *ServerCapabilities/workspace/workspaceFolders* and *ClientCapabilities/workspace/workspaceFolders* are
215216
/// true; or if the server has registered to receive this notification it first.
216217
abstract member WorkspaceDidChangeWorkspaceFolders: DidChangeWorkspaceFoldersParams -> Async<unit>
217218

@@ -254,7 +255,8 @@ type ILspServer =
254255

255256
/// The workspace symbol request is sent from the client to the server to list project-wide symbols matching
256257
/// the query string.
257-
abstract member WorkspaceSymbol: WorkspaceSymbolParams -> AsyncLspResult<U2<SymbolInformation [], WorkspaceSymbol []> option>
258+
abstract member WorkspaceSymbol:
259+
WorkspaceSymbolParams -> AsyncLspResult<U2<SymbolInformation [], WorkspaceSymbol []> option>
258260

259261

260262
/// The request is sent from the client to the server to resolve additional information for a given workspace symbol.
@@ -325,9 +327,9 @@ type ILspServer =
325327
/// progress initiated on the server side using the `window/workDoneProgress/create`. The progress need
326328
/// not be marked as cancellable to be cancelled and a client may cancel a progress for any number of
327329
/// reasons: in case of error, reloading a workspace etc.
328-
abstract member WorkDoneProgessCancel: ProgressToken -> Async<unit>
330+
abstract member WorkDoneProgressCancel: ProgressToken -> Async<unit>
329331

330-
/// The inline value request is sent from the client to the server to compute inline values for a given text document
332+
/// The inline value request is sent from the client to the server to compute inline values for a given text document
331333
/// that may be rendered in the editor at the end of lines.
332334
abstract member TextDocumentInlineValue: InlineValueParams -> AsyncLspResult<InlineValue [] option>
333335

@@ -336,24 +338,28 @@ type ILspServer =
336338
/// steps:
337339
/// 1. first a call hierarchy item is resolved for the given text document position
338340
/// 2. for a call hierarchy item the incoming or outgoing call hierarchy items are resolved.
339-
abstract member TextDocumentPrepareCallHierarchy: CallHierarchyPrepareParams -> AsyncLspResult<CallHierarchyItem [] option>
341+
abstract member TextDocumentPrepareCallHierarchy:
342+
CallHierarchyPrepareParams -> AsyncLspResult<CallHierarchyItem [] option>
340343

341344
/// The request is sent from the client to the server to resolve incoming calls for a given call hierarchy
342345
/// item. The request doesn't define its own client and server capabilities. It is only issued if a server
343346
/// registers for the `textDocument/prepareCallHierarchy` request.
344-
abstract member CallHierarchyIncomingCalls: CallHierarchyIncomingCallsParams -> AsyncLspResult<CallHierarchyIncomingCall [] option>
347+
abstract member CallHierarchyIncomingCalls:
348+
CallHierarchyIncomingCallsParams -> AsyncLspResult<CallHierarchyIncomingCall [] option>
345349

346350
/// The request is sent from the client to the server to resolve outgoing calls for a given call hierarchy
347351
/// item. The request doesn't define its own client and server capabilities. It is only issued if a server
348352
/// registers for the `textDocument/prepareCallHierarchy` request.
349-
abstract member CallHierarchyOutgoingCalls: CallHierarchyOutgoingCallsParams -> AsyncLspResult<CallHierarchyOutgoingCall [] option>
353+
abstract member CallHierarchyOutgoingCalls:
354+
CallHierarchyOutgoingCallsParams -> AsyncLspResult<CallHierarchyOutgoingCall [] option>
350355

351356
/// The type hierarchy request is sent from the client to the server to return a type hierarchy for the
352357
/// language element of given text document positions. Will return `null` if the server couldn't infer a
353358
/// valid type from the position. The type hierarchy requests are executed in two steps:
354359
/// 1. first a type hierarchy item is prepared for the given text document position.
355360
/// 2. for a type hierarchy item the supertype or subtype type hierarchy items are resolved.
356-
abstract member TextDocumentPrepareTypeHierarchy: TypeHierarchyPrepareParams -> AsyncLspResult<TypeHierarchyItem [] option>
361+
abstract member TextDocumentPrepareTypeHierarchy:
362+
TypeHierarchyPrepareParams -> AsyncLspResult<TypeHierarchyItem [] option>
357363

358364
/// The request is sent from the client to the server to resolve the supertype for a given type hierarchy
359365
/// item. Will return `null` is the serve couldn't infer a valid type from `item` in the params. The request
@@ -468,6 +474,7 @@ type LspServer() =
468474
/// The go to declaration request is sent from the client to the server to resolve the declaration location
469475
/// of a symbol at a given text document position.
470476
abstract member TextDocumentDeclaration: TextDocumentPositionParams -> AsyncLspResult<GotoResult option>
477+
471478
default __.TextDocumentDeclaration(_) = notImplemented
472479

473480
/// The goto definition request is sent from the client to the server to resolve the definition location of
@@ -603,7 +610,8 @@ type LspServer() =
603610
/// returned to describe valid contents. A rename to one of the ranges can be applied to all other ranges if the new
604611
/// content is valid. If no result-specific word pattern is provided, the word pattern from the client’s language
605612
/// configuration is used.
606-
abstract member TextDocumentLinkedEditingRange: TextDocumentPositionParams -> AsyncLspResult<LinkedEditingRanges option>
613+
abstract member TextDocumentLinkedEditingRange:
614+
TextDocumentPositionParams -> AsyncLspResult<LinkedEditingRanges option>
607615

608616
default __.TextDocumentLinkedEditingRange(_) = notImplemented
609617

@@ -617,7 +625,7 @@ type LspServer() =
617625

618626
/// The `workspace/didChangeWorkspaceFolders` notification is sent from the client to the server to inform
619627
/// the server about workspace folder configuration changes. The notification is sent by default if both
620-
/// *ServerCapabilities/workspace/workspaceFolders* and *ClientCapabilities/workapce/workspaceFolders* are
628+
/// *ServerCapabilities/workspace/workspaceFolders* and *ClientCapabilities/workspace/workspaceFolders* are
621629
/// true; or if the server has registered to receive this notification it first.
622630
abstract member WorkspaceDidChangeWorkspaceFolders: DidChangeWorkspaceFoldersParams -> Async<unit>
623631

@@ -668,7 +676,8 @@ type LspServer() =
668676

669677
/// The workspace symbol request is sent from the client to the server to list project-wide symbols matching
670678
/// the query string.
671-
abstract member WorkspaceSymbol: WorkspaceSymbolParams -> AsyncLspResult<U2<SymbolInformation [], WorkspaceSymbol []> option>
679+
abstract member WorkspaceSymbol:
680+
WorkspaceSymbolParams -> AsyncLspResult<U2<SymbolInformation [], WorkspaceSymbol []> option>
672681

673682
default __.WorkspaceSymbol(_) = notImplemented
674683

@@ -755,55 +764,66 @@ type LspServer() =
755764
/// progress initiated on the server side using the `window/workDoneProgress/create`. The progress need
756765
/// not be marked as cancellable to be cancelled and a client may cancel a progress for any number of
757766
/// reasons: in case of error, reloading a workspace etc.
758-
abstract member WorkDoneProgessCancel: ProgressToken -> Async<unit>
767+
abstract member WorkDoneProgressCancel: ProgressToken -> Async<unit>
759768

760-
default __.WorkDoneProgessCancel(_) = ignoreNotification
769+
default __.WorkDoneProgressCancel(_) = ignoreNotification
761770

762-
/// The inline value request is sent from the client to the server to compute inline values for a given text document
771+
/// The inline value request is sent from the client to the server to compute inline values for a given text document
763772
/// that may be rendered in the editor at the end of lines.
764773
abstract member TextDocumentInlineValue: InlineValueParams -> AsyncLspResult<InlineValue [] option>
774+
765775
default __.TextDocumentInlineValue(_) = notImplemented
766776

767777
/// The call hierarchy request is sent from the client to the server to return a call hierarchy for the
768778
/// language element of given text document positions. The call hierarchy requests are executed in two
769779
/// steps:
770780
/// 1. first a call hierarchy item is resolved for the given text document position
771781
/// 2. for a call hierarchy item the incoming or outgoing call hierarchy items are resolved.
772-
abstract member TextDocumentPrepareCallHierarchy: CallHierarchyPrepareParams -> AsyncLspResult<CallHierarchyItem [] option>
782+
abstract member TextDocumentPrepareCallHierarchy:
783+
CallHierarchyPrepareParams -> AsyncLspResult<CallHierarchyItem [] option>
784+
773785
default __.TextDocumentPrepareCallHierarchy(_) = notImplemented
774786

775787
/// The request is sent from the client to the server to resolve incoming calls for a given call hierarchy
776788
/// item. The request doesn't define its own client and server capabilities. It is only issued if a server
777789
/// registers for the `textDocument/prepareCallHierarchy` request.
778-
abstract member CallHierarchyIncomingCalls: CallHierarchyIncomingCallsParams -> AsyncLspResult<CallHierarchyIncomingCall [] option>
790+
abstract member CallHierarchyIncomingCalls:
791+
CallHierarchyIncomingCallsParams -> AsyncLspResult<CallHierarchyIncomingCall [] option>
792+
779793
default __.CallHierarchyIncomingCalls(_) = notImplemented
780794

781795
/// The request is sent from the client to the server to resolve outgoing calls for a given call hierarchy
782796
/// item. The request doesn't define its own client and server capabilities. It is only issued if a server
783797
/// registers for the `textDocument/prepareCallHierarchy` request.
784-
abstract member CallHierarchyOutgoingCalls: CallHierarchyOutgoingCallsParams -> AsyncLspResult<CallHierarchyOutgoingCall [] option>
798+
abstract member CallHierarchyOutgoingCalls:
799+
CallHierarchyOutgoingCallsParams -> AsyncLspResult<CallHierarchyOutgoingCall [] option>
800+
785801
default __.CallHierarchyOutgoingCalls(_) = notImplemented
786802

787803
/// The type hierarchy request is sent from the client to the server to return a type hierarchy for the
788804
/// language element of given text document positions. Will return `null` if the server couldn't infer a
789805
/// valid type from the position. The type hierarchy requests are executed in two steps:
790806
/// 1. first a type hierarchy item is prepared for the given text document position.
791807
/// 2. for a type hierarchy item the supertype or subtype type hierarchy items are resolved.
792-
abstract member TextDocumentPrepareTypeHierarchy: TypeHierarchyPrepareParams -> AsyncLspResult<TypeHierarchyItem [] option>
808+
abstract member TextDocumentPrepareTypeHierarchy:
809+
TypeHierarchyPrepareParams -> AsyncLspResult<TypeHierarchyItem [] option>
810+
793811
default __.TextDocumentPrepareTypeHierarchy(_) = notImplemented
794812

795813
/// The request is sent from the client to the server to resolve the supertype for a given type hierarchy
796814
/// item. Will return `null` is the serve couldn't infer a valid type from `item` in the params. The request
797815
/// doesn't defines its own client and server capabilities. It is only issued if a server registers for the
798816
/// `textDocument/prepareTypeHierarchy` request.
799817
abstract member TypeHierarchySupertypes: TypeHierarchySupertypesParams -> AsyncLspResult<TypeHierarchyItem [] option>
818+
800819
default __.TypeHierarchySupertypes(_) = notImplemented
801820

802821
/// The request is sent from the client to the server to resolve the supertype for a given type hierarchy
803822
/// item. Will return `null` is the serve couldn't infer a valid type from `item` in the params. The request
804823
/// doesn't defines its own client and server capabilities. It is only issued if a server registers for the
805824
/// `textDocument/prepareTypeHierarchy` request.
806825
abstract member TypeHierarchySubtypes: TypeHierarchySubtypesParams -> AsyncLspResult<TypeHierarchyItem [] option>
826+
807827
default __.TypeHierarchySubtypes(_) = notImplemented
808828

809829
/// The text document diagnostic request is sent from the client to the server to ask the server to compute
@@ -888,15 +908,19 @@ type LspServer() =
888908
member this.TextDocumentSemanticTokensRange(p: SemanticTokensRangeParams) = this.TextDocumentSemanticTokensRange(p)
889909
member this.TextDocumentInlayHint(p: InlayHintParams) = this.TextDocumentInlayHint(p)
890910
member this.InlayHintResolve(p: InlayHint) = this.InlayHintResolve(p)
891-
member this.WorkDoneProgessCancel(token) = this.WorkDoneProgessCancel(token)
911+
member this.WorkDoneProgressCancel(token) = this.WorkDoneProgressCancel(token)
892912
member this.TextDocumentInlineValue(p: InlineValueParams) = this.TextDocumentInlineValue(p)
893913

894-
member this.TextDocumentPrepareCallHierarchy(p: CallHierarchyPrepareParams) = this.TextDocumentPrepareCallHierarchy(p)
914+
member this.TextDocumentPrepareCallHierarchy(p: CallHierarchyPrepareParams) =
915+
this.TextDocumentPrepareCallHierarchy(p)
916+
895917
member this.CallHierarchyIncomingCalls(p: CallHierarchyIncomingCallsParams) = this.CallHierarchyIncomingCalls(p)
896918
member this.CallHierarchyOutgoingCalls(p: CallHierarchyOutgoingCallsParams) = this.CallHierarchyOutgoingCalls(p)
897919

898-
member this.TextDocumentPrepareTypeHierarchy(p: TypeHierarchyPrepareParams) = this.TextDocumentPrepareTypeHierarchy(p)
920+
member this.TextDocumentPrepareTypeHierarchy(p: TypeHierarchyPrepareParams) =
921+
this.TextDocumentPrepareTypeHierarchy(p)
922+
899923
member this.TypeHierarchySupertypes(p: TypeHierarchySupertypesParams) = this.TypeHierarchySupertypes(p)
900924
member this.TypeHierarchySubtypes(p: TypeHierarchySubtypesParams) = this.TypeHierarchySubtypes(p)
901925
member this.TextDocumentDiagnostic(p: DocumentDiagnosticParams) = this.TextDocumentDiagnostic(p)
902-
member this.WorkspaceDiagnostic(p: WorkspaceDiagnosticParams) = this.WorkspaceDiagnostic(p)
926+
member this.WorkspaceDiagnostic(p: WorkspaceDiagnosticParams) = this.WorkspaceDiagnostic(p)

0 commit comments

Comments
 (0)