From c336aa91b64a6057de52053a6f888758ab630214 Mon Sep 17 00:00:00 2001 From: tgodzik Date: Wed, 16 Mar 2022 16:32:09 +0100 Subject: [PATCH] Prefer Scala 2.13 version over older versions --- .../main/scala/scala/meta/internal/metals/BuildTargets.scala | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/metals/src/main/scala/scala/meta/internal/metals/BuildTargets.scala b/metals/src/main/scala/scala/meta/internal/metals/BuildTargets.scala index bd293589137..d014ba8f75c 100644 --- a/metals/src/main/scala/scala/meta/internal/metals/BuildTargets.scala +++ b/metals/src/main/scala/scala/meta/internal/metals/BuildTargets.scala @@ -85,6 +85,10 @@ final class BuildTargets( ) if (isScala2) score <<= 1 + val isScala213Version = + scalaTarget(t).exists(info => info.scalaBinaryVersion == "2.13") + if (isScala213Version) score <<= 1 + score }