From e77937f4f4a1995e717963a08e9ad636da43cce4 Mon Sep 17 00:00:00 2001 From: Hadrian Tang Date: Sun, 13 Aug 2023 03:04:55 +0800 Subject: [PATCH] never seen fantomas used this way --- src/FsAutoComplete/LspServers/AdaptiveFSharpLspServer.fs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/FsAutoComplete/LspServers/AdaptiveFSharpLspServer.fs b/src/FsAutoComplete/LspServers/AdaptiveFSharpLspServer.fs index a2d546a80..6fc7b9ee1 100644 --- a/src/FsAutoComplete/LspServers/AdaptiveFSharpLspServer.fs +++ b/src/FsAutoComplete/LspServers/AdaptiveFSharpLspServer.fs @@ -417,8 +417,8 @@ type AdaptiveFSharpLspServer disposables.Add <| fileChecked.Publish.Subscribe(fun (parseAndCheck, volatileFile, ct) -> if volatileFile.Source.Length = 0 then - () - else // Don't analyze and error on an empty file + () // Don't analyze and error on an empty file + else async { let config = config |> AVal.force do! builtInCompilerAnalyzers config volatileFile parseAndCheck @@ -2443,8 +2443,8 @@ type AdaptiveFSharpLspServer let! volatileFile = forceFindOpenFileOrRead filePath |> AsyncResult.ofStringErr if volatileFile.Source.Length = 0 then - return None - else // An empty file has empty completions. Otherwise we would error down there + return None // An empty file has empty completions. Otherwise we would error down there + else let! lineStr = volatileFile.Source |> tryGetLineStr pos |> Result.ofStringErr