diff --git a/metals/src/main/scala/scala/meta/internal/metals/WorkspaceFolders.scala b/metals/src/main/scala/scala/meta/internal/metals/WorkspaceFolders.scala index 72018c184b1..c0104e36a17 100644 --- a/metals/src/main/scala/scala/meta/internal/metals/WorkspaceFolders.scala +++ b/metals/src/main/scala/scala/meta/internal/metals/WorkspaceFolders.scala @@ -75,7 +75,7 @@ class WorkspaceFolders( if (!isIn(services, folder)) { WorkspaceFoldersServices( services :+ newService, - nonScalaProjects.filter(_ == folder), + nonScalaProjects.filterNot(_ == folder), ) } else wfs } @@ -101,14 +101,6 @@ class WorkspaceFolders( } -trait MetalsLspServiceCreator { - def apply( - folder: Folder, - updateLoggerFiles: () => Future[Unit], - forceIsScalaProject: Boolean = false, - ): MetalsLspService -} - case class WorkspaceFoldersServices( services: List[MetalsLspService], nonScalaFolders: List[Folder], diff --git a/metals/src/main/scala/scala/meta/metals/MetalsLanguageServer.scala b/metals/src/main/scala/scala/meta/metals/MetalsLanguageServer.scala index a648fef166c..a74ce31ce5d 100644 --- a/metals/src/main/scala/scala/meta/metals/MetalsLanguageServer.scala +++ b/metals/src/main/scala/scala/meta/metals/MetalsLanguageServer.scala @@ -201,7 +201,7 @@ class MetalsLanguageServer( serverState.set(ServerState.Initialized(service)) metalsService.underlying = service - folderPaths.foreach(folder => + folderPathsWithScala.foreach(folder => new StdReportContext(folder.toNIO).cleanUpOldReports() )