Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
kasiaMarek committed Apr 19, 2024
1 parent 16d3bea commit 56d4ce5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions metals/src/main/scala/scala/meta/internal/metals/Compilers.scala
Expand Up @@ -642,7 +642,8 @@ class Compilers(
token: CancelToken,
): Future[CompletionList] =
withPCAndAdjustLsp(params) { (pc, pos, adjust) =>
val outlineFiles = outlineFilesProvider.getOutlineFiles(pc.buildTargetId())
val outlineFiles =
outlineFilesProvider.getOutlineFiles(pc.buildTargetId())
val offsetParams =
CompilerOffsetParamsUtils.fromPos(pos, token, outlineFiles)
pc.complete(offsetParams)
Expand Down Expand Up @@ -859,11 +860,11 @@ class Compilers(
symbol: String,
): Future[Option[PcSymbolInformation]] = {
loadCompiler(path, forceScala = true)
.map (
_.info(symbol)
.asScala
.map(
_.info(symbol).asScala
.map(_.asScala.map(PcSymbolInformation.from))
).getOrElse(Future(None))
)
.getOrElse(Future(None))
}

private def definition(
Expand Down
Expand Up @@ -144,11 +144,11 @@ class BuildTargetOutlineFilesProvider(
.buildTargetSources(id)
.flatMap(_.listRecursive.toList)

if(allFiles.size > OutlineFilesProvider.maxOutlineFiles) {
if (allFiles.size > OutlineFilesProvider.maxOutlineFiles) {
// too many files to outline using pc
None
} else {
val inputs =allFiles.flatMap(toVirtualFileParams(_)).toList.asJava
val inputs = allFiles.flatMap(toVirtualFileParams(_)).toList.asJava
Some(
OutlineFiles(
inputs,
Expand Down

0 comments on commit 56d4ce5

Please sign in to comment.