@@ -350,7 +350,6 @@ type CSharpLspHostServices () =
350350let tryLoadSolutionOnPath
351351 ( lspClient : ILspClient )
352352 ( logger : ILog )
353- ( showMessage : string -> Async < unit >)
354353 solutionPath =
355354 let progress = ProgressReporter( lspClient)
356355
@@ -423,7 +422,6 @@ let tryLoadSolutionFromProjectFiles
423422let findAndLoadSolutionOnDir
424423 ( lspClient : ILspClient )
425424 ( logger : ILog )
426- ( showMessage : string -> Async < unit >)
427425 dir =
428426 async {
429427 let fileNotOnNodeModules ( filename : string ) =
@@ -436,6 +434,12 @@ let findAndLoadSolutionOnDir
436434 |> Seq.filter fileNotOnNodeModules
437435 |> Seq.toList
438436
437+ let showMessage m =
438+ lspClient.WindowShowMessage({
439+ Type = MessageType.Info
440+ Message = sprintf " csharp-ls: %s " m
441+ })
442+
439443 do ! showMessage ( sprintf " %d solution(s) found: [%s ]" solutionFiles.Length ( String.Join( " , " , solutionFiles)) )
440444
441445 let singleSolutionFound =
@@ -464,23 +468,27 @@ let findAndLoadSolutionOnDir
464468 return ! tryLoadSolutionFromProjectFiles lspClient logger showMessage projFiles
465469
466470 | Some solutionPath ->
467- return ! tryLoadSolutionOnPath lspClient logger showMessage solutionPath
471+ return ! tryLoadSolutionOnPath lspClient logger solutionPath
468472 }
469473
470474let loadSolutionOnSolutionPathOrDir
471475 ( lspClient : ILspClient )
472476 ( logger : ILog )
473- ( showMessage : string -> Async < unit >)
474477 solutionPathMaybe
475478 rootPath =
476479 match solutionPathMaybe with
477480 | Some solutionPath -> async {
478- return ! tryLoadSolutionOnPath lspClient logger showMessage solutionPath
481+ return ! tryLoadSolutionOnPath lspClient logger solutionPath
479482 }
480483
481484 | None -> async {
482- do ! showMessage ( sprintf " attempting to find and load solution based on root path (\" %s \" ).." rootPath)
483- return ! findAndLoadSolutionOnDir lspClient logger showMessage rootPath
485+ let logMessage : ShowMessageParams = {
486+ Type = MessageType.Info
487+ Message = sprintf " csharp-ls: attempting to find and load solution based on root path (\" %s \" ).." rootPath
488+ }
489+
490+ do ! lspClient.WindowShowMessage( logMessage)
491+ return ! findAndLoadSolutionOnDir lspClient logger rootPath
484492 }
485493
486494let getContainingTypeOrThis ( symbol : ISymbol ): INamedTypeSymbol =
0 commit comments