Skip to content
Merged
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
5 changes: 5 additions & 0 deletions src/FsAutoComplete/LspServers/AdaptiveFSharpLspServer.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3458,6 +3458,11 @@ module AdaptiveFSharpLspServer =
use input = Console.OpenStandardInput()
use output = Console.OpenStandardOutput()

// Attempt to prevent any console output from interfering with the LSP communication from libraries that may use Console.WriteLine
// https://github.com/ionide/ionide-vscode-fsharp/issues/2102
// This is a best-effort mitigation; libraries that write directly to the underlying stream like (Console.OpenStandardOutput) may still interfere.
Console.SetOut(TextWriter.Null)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol, I love it :D


let requestsHandlings =
(defaultRequestHandlings (): Map<string, ServerRequestHandling<IFSharpLspServer>>)
|> Map.add "fsharp/signature" (serverRequestHandling (fun s p -> s.FSharpSignature(p)))
Expand Down