Skip to content

Commit

Permalink
formatting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kasiaMarek committed Nov 28, 2023
1 parent 7f33208 commit f91be9b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ class ShowBspErrorHandler(
currentSession: () => Option[BspSession],
tables: Tables,
bspStatus: ConnectionBspStatus,
)(implicit reportContext: ReportContext) extends BspErrorHandler {
)(implicit reportContext: ReportContext)
extends BspErrorHandler {
def onError(message: String): Unit = {
if (shouldShowBspError) {
for {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ class BspMetalsLspService(
maybeJdkVersion,
getVisibleName,
Some(buildTools),
Some(connectionBspStatus)
Some(connectionBspStatus),
)

val gitHubIssueFolderInfo = new GitHubIssueFolderInfo(
Expand Down Expand Up @@ -521,7 +521,9 @@ class BspMetalsLspService(
}
}

override protected def onDeleteWatchedFiles(files: List[AbsolutePath]): Unit = {
override protected def onDeleteWatchedFiles(
files: List[AbsolutePath]
): Unit = {
val (bloopReportDelete, otherDeleteEvents) =
files.partition(_.toNIO.startsWith(reports.bloop.maybeReportsDir))
if (bloopReportDelete.nonEmpty) connectionBspStatus.onReportsUpdate()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class FallbackMetalsLspService(
maybeJdkVersion,
folderName = getVisibleName,
buildTools = None,
bspStatus = None
bspStatus = None,
)
override protected def bspSession: Option[BspSession] = None
override protected def buildServerPromise: Promise[Unit] =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,8 @@ abstract class MetalsLspService(
userConfig.showInferredType != old.showInferredType
) {
buildServerPromise.future.flatMap { _ =>
focusedDocument().map(publishSynthetics(_, force = true))
focusedDocument()
.map(publishSynthetics(_, force = true))
.getOrElse(Future.successful(()))
}
} else {
Expand Down Expand Up @@ -1001,7 +1002,8 @@ abstract class MetalsLspService(
onChange(changeAndCreateEvents.map(_.getUri().toAbsolutePath))
}

protected def onDeleteWatchedFiles(files: List[AbsolutePath]): Unit = files.foreach(onDelete)
protected def onDeleteWatchedFiles(files: List[AbsolutePath]): Unit =
files.foreach(onDelete)

/**
* This filter is an optimization and it is closely related to which files are
Expand Down Expand Up @@ -1071,7 +1073,8 @@ abstract class MetalsLspService(
compilations
.compileFiles(paths, Option(focusedDocumentBuildTarget.get())),
) ++ paths.map(f => Future(interactiveSemanticdbs.textDocument(f)))
).ignoreValue
)
.ignoreValue
}

protected def onDelete(path: AbsolutePath): Future[Unit] = {
Expand Down

0 comments on commit f91be9b

Please sign in to comment.