diff --git a/metals/src/main/scala/scala/meta/internal/metals/WorkspaceLspService.scala b/metals/src/main/scala/scala/meta/internal/metals/WorkspaceLspService.scala index 0d69a1b9228..899bdf9fb76 100644 --- a/metals/src/main/scala/scala/meta/internal/metals/WorkspaceLspService.scala +++ b/metals/src/main/scala/scala/meta/internal/metals/WorkspaceLspService.scala @@ -158,6 +158,7 @@ class WorkspaceLspService( () => httpServer, clientConfig, languageClient, + clientConfig.isHttpEnabled(), ) private val bspStatus = new BspStatus( @@ -1263,8 +1264,8 @@ class WorkspaceLspService( workDoneProgress.start(sh, 0, 1, ju.concurrent.TimeUnit.SECONDS) for { _ <- userConfigSync.initSyncUserConfiguration(folderServices) - _ <- Future.sequence(folderServices.map(_.initialized())) _ <- Future(startHttpServer()) + _ <- Future.sequence(folderServices.map(_.initialized())) } yield () } diff --git a/metals/src/main/scala/scala/meta/internal/metals/doctor/HeadDoctor.scala b/metals/src/main/scala/scala/meta/internal/metals/doctor/HeadDoctor.scala index 8b6b974ab13..e00914cb82a 100644 --- a/metals/src/main/scala/scala/meta/internal/metals/doctor/HeadDoctor.scala +++ b/metals/src/main/scala/scala/meta/internal/metals/doctor/HeadDoctor.scala @@ -17,6 +17,7 @@ class HeadDoctor( httpServer: () => Option[MetalsHttpServer], clientConfig: ClientConfiguration, languageClient: MetalsLanguageClient, + isHttpEnabled: Boolean, ) { private val isVisible = new AtomicBoolean(false) @@ -85,10 +86,14 @@ class HeadDoctor( httpServer() match { case Some(server) => onServer(server) - case None => + case None if !isHttpEnabled => scribe.warn( "Unable to run doctor. Make sure `isHttpEnabled` is set to `true`." ) + case None => + scribe.info( + "Doctor was not yet started, check logs to make sure it's running" + ) } } }