Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
baronfel committed Jul 10, 2022
1 parent 862aef6 commit ca84f90
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/FsAutoComplete/CodeFixes/ExternalSystemDiagnostics.fs
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ open Ionide.LanguageServerProtocol.Types
open FsAutoComplete
open Newtonsoft.Json.Linq

let private (|Payload|_|) (tok: JToken): 't option =
let private (|Payload|_|) (tok: JToken) : 't option =
try
Some(Ionide.LanguageServerProtocol.Server.deserialize tok : 't)
with
| e -> None
Some(Ionide.LanguageServerProtocol.Server.deserialize tok: 't)
with e ->
None

let private mapExternalDiagnostic diagnosticType =
Run.ifDiagnosticByType diagnosticType (fun diagnostic codeActionParams ->
match diagnostic.Data with
| None -> AsyncResult.retn []
| Some fixes ->
match fixes with
| Payload(fixes: list<TextEdit>) ->
| Payload (fixes: list<TextEdit>) ->
AsyncResult.retn
[ { SourceDiagnostic = Some diagnostic
File = codeActionParams.TextDocument
Expand Down
5 changes: 4 additions & 1 deletion src/FsAutoComplete/FsAutoComplete.Lsp.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1719,7 +1719,10 @@ type FSharpLspServer(state: State, lspClient: FSharpLspClient) =
| actions ->
return
actions
|> List.map (CodeAction.OfFix commands.TryGetFileVersion clientCapabilities.Value >> U2.Second)
|> List.map (
CodeAction.OfFix commands.TryGetFileVersion clientCapabilities.Value
>> U2.Second
)
|> List.toArray
|> Some
}
Expand Down

0 comments on commit ca84f90

Please sign in to comment.