diff --git a/mtags-shared/src/main/scala/scala/meta/internal/mtags/CommonMtagsEnrichments.scala b/mtags-shared/src/main/scala/scala/meta/internal/mtags/CommonMtagsEnrichments.scala index 838a77e99d6..c54a1eafc9f 100644 --- a/mtags-shared/src/main/scala/scala/meta/internal/mtags/CommonMtagsEnrichments.scala +++ b/mtags-shared/src/main/scala/scala/meta/internal/mtags/CommonMtagsEnrichments.scala @@ -21,6 +21,7 @@ import scala.meta.internal.metals.CompilerOffsetParams import scala.meta.internal.metals.CompilerRangeParams import scala.meta.internal.pc.CompletionItemData import scala.meta.internal.pc.RangeOffset +import scala.meta.pc.HoverContentType import scala.meta.pc.OffsetParams import scala.meta.pc.RangeParams import scala.meta.pc.VirtualFileParams @@ -31,7 +32,6 @@ import org.eclipse.lsp4j.CompletionItem import org.eclipse.lsp4j.MarkupContent import org.eclipse.lsp4j.jsonrpc.messages.{Either => JEither} import org.eclipse.{lsp4j => l} -import scala.meta.pc.HoverContentType object CommonMtagsEnrichments extends CommonMtagsEnrichments {} trait CommonMtagsEnrichments { diff --git a/mtags-shared/src/main/scala/scala/meta/internal/pc/HoverMarkup.scala b/mtags-shared/src/main/scala/scala/meta/internal/pc/HoverMarkup.scala index d7d7edccbbf..7d5c030bd8b 100644 --- a/mtags-shared/src/main/scala/scala/meta/internal/pc/HoverMarkup.scala +++ b/mtags-shared/src/main/scala/scala/meta/internal/pc/HoverMarkup.scala @@ -44,7 +44,7 @@ object HoverMarkup { } if (forceExpressionType || optSymbolSignature.isEmpty) { appendCode( - Option.when(optSymbolSignature.isDefined)("Expression type"), + if (optSymbolSignature.isDefined) Some("Expression type") else None, expressionType ) builder.append("\n") @@ -53,7 +53,7 @@ object HoverMarkup { optSymbolSignature.foreach { symbolSignature => if (symbolSignature.nonEmpty) { appendCode( - Option.when(forceExpressionType)("Symbol signature"), + if (forceExpressionType) Some("Symbol signature") else None, symbolSignature ) } @@ -111,7 +111,7 @@ object HoverMarkup { if (symbolSignature.nonEmpty) addCode( - Option.when(forceExpressionType)("Symbol signature"), + if (forceExpressionType) Some("Symbol signature") else None, symbolSignature )