Skip to content

Commit

Permalink
chore: Run scalafix 0.12.0, fix ScalametaCompat for Scala 3.4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
jkciesluk committed Mar 8, 2024
1 parent 55077c0 commit 1c416ca
Show file tree
Hide file tree
Showing 21 changed files with 27 additions and 24 deletions.
5 changes: 4 additions & 1 deletion build.sbt
Expand Up @@ -722,7 +722,10 @@ lazy val mtest = project
Compile / unmanagedSourceDirectories ++= {
val base = (mtags / Compile / sourceDirectory).value
if (isScala3WithPresentationCompiler(scalaVersion.value)) {
List(base / "scala")
List(
base / "scala",
base / "scala-3" / "scala" / "meta" / "internal" / "metals",
)
} else {
Nil
}
Expand Down
Expand Up @@ -27,7 +27,7 @@ import dotty.tools.dotc.interactive.InteractiveDriver
import dotty.tools.dotc.util.SourcePosition
import dotty.tools.dotc.util.Spans
import dotty.tools.dotc.util.Spans.Span
import org.eclipse.{lsp4j as l}
import org.eclipse.lsp4j as l

object MtagsEnrichments extends ScalametaCommonEnrichments:

Expand Down
Expand Up @@ -14,7 +14,7 @@ import dotty.tools.dotc.core.Names.*
import dotty.tools.dotc.core.Symbols.*
import dotty.tools.dotc.util.SourcePosition
import dotty.tools.dotc.util.Spans
import org.eclipse.{lsp4j as l}
import org.eclipse.lsp4j as l

object AutoImports:

Expand Down
Expand Up @@ -16,7 +16,7 @@ import dotty.tools.dotc.core.Symbols.*
import dotty.tools.dotc.interactive.Interactive
import dotty.tools.dotc.interactive.InteractiveDriver
import dotty.tools.dotc.util.SourceFile
import org.eclipse.{lsp4j as l}
import org.eclipse.lsp4j as l

final class AutoImportsProvider(
search: SymbolSearch,
Expand Down
Expand Up @@ -12,7 +12,7 @@ import dotty.tools.dotc.core.Types.MethodType
import dotty.tools.dotc.interactive.Interactive
import dotty.tools.dotc.interactive.InteractiveDriver
import dotty.tools.dotc.util.SourceFile
import org.eclipse.{lsp4j as l}
import org.eclipse.lsp4j as l

final class ConvertToNamedArgumentsProvider(
driver: InteractiveDriver,
Expand Down
Expand Up @@ -24,8 +24,8 @@ import dotty.tools.dotc.interactive.Interactive
import dotty.tools.dotc.interactive.InteractiveDriver
import dotty.tools.dotc.util.SourceFile
import dotty.tools.dotc.util.SourcePosition
import org.eclipse.lsp4j as l
import org.eclipse.lsp4j.TextEdit
import org.eclipse.{lsp4j as l}

final class ExtractMethodProvider(
range: RangeParams,
Expand Down
@@ -1,6 +1,6 @@
package scala.meta.internal.pc

import java.{util as ju}
import java.util as ju

import scala.meta.internal.metals.Report
import scala.meta.internal.metals.ReportContext
Expand Down
Expand Up @@ -26,8 +26,8 @@ import dotty.tools.dotc.util.SourceFile
import dotty.tools.dotc.util.SourcePosition
import dotty.tools.dotc.util.Spans
import dotty.tools.dotc.util.Spans.Span
import org.eclipse.lsp4j.TextEdit
import org.eclipse.lsp4j as l
import org.eclipse.lsp4j.TextEdit

/**
* Tries to calculate edits needed to insert the inferred type annotation
Expand Down
@@ -1,7 +1,7 @@
package scala.meta.internal.pc

import java.net.URI
import java.{util as ju}
import java.util as ju

import dotty.tools.dotc.interactive.InteractiveDriver
import dotty.tools.dotc.reporting.Diagnostic
Expand Down
Expand Up @@ -21,9 +21,9 @@ import dotty.tools.dotc.interactive.InteractiveDriver
import dotty.tools.dotc.util.SourceFile
import dotty.tools.dotc.util.SourcePosition
import dotty.tools.dotc.util.Spans.Span
import org.eclipse.lsp4j as l
import org.eclipse.lsp4j.InlayHint
import org.eclipse.lsp4j.InlayHintKind
import org.eclipse.{lsp4j as l}

class PcInlayHintsProvider(
driver: InteractiveDriver,
Expand Down
Expand Up @@ -14,7 +14,7 @@ import dotty.tools.dotc.core.Symbols.Symbol
import dotty.tools.dotc.interactive.Interactive
import dotty.tools.dotc.interactive.InteractiveDriver
import dotty.tools.dotc.util.SourcePosition
import org.eclipse.{lsp4j as l}
import org.eclipse.lsp4j as l

final class PcInlineValueProviderImpl(
val driver: InteractiveDriver,
Expand Down
Expand Up @@ -9,7 +9,7 @@ import dotty.tools.dotc.core.Flags.*
import dotty.tools.dotc.core.Symbols.Symbol
import dotty.tools.dotc.interactive.InteractiveDriver
import dotty.tools.dotc.util.SourcePosition
import org.eclipse.{lsp4j as l}
import org.eclipse.lsp4j as l

final class PcRenameProvider(
driver: InteractiveDriver,
Expand Down
@@ -1,7 +1,7 @@
package scala.meta.internal.pc

import java.nio.file.Paths
import java.{util as ju}
import java.util as ju

import scala.jdk.CollectionConverters.*

Expand Down
Expand Up @@ -20,7 +20,7 @@ import dotty.tools.dotc.interactive.InteractiveDriver
import dotty.tools.dotc.util.Signatures
import dotty.tools.dotc.util.Signatures.Signature
import dotty.tools.dotc.util.SourcePosition
import org.eclipse.{lsp4j as l}
import org.eclipse.lsp4j as l

object SignatureHelpProvider:

Expand Down
Expand Up @@ -6,12 +6,12 @@ import java.nio.file.Path

import scala.meta.internal.mtags.MtagsEnrichments.*

import dotty.tools.dotc.ast.tpd.Tree
import dotty.tools.dotc.ast.tpd.*
import dotty.tools.dotc.ast.tpd.Tree
import dotty.tools.dotc.ast.untpd.ImportSelector
import dotty.tools.dotc.core.Contexts.Context
import dotty.tools.dotc.core.StdNames.*
import org.eclipse.{lsp4j as l}
import org.eclipse.lsp4j as l

object AmmoniteFileCompletions:

Expand Down
Expand Up @@ -15,7 +15,7 @@ import dotty.tools.dotc.core.Contexts.*
import dotty.tools.dotc.core.StdNames.*
import dotty.tools.dotc.util.SourcePosition
import dotty.tools.dotc.util.Spans
import org.eclipse.{lsp4j as l}
import org.eclipse.lsp4j as l

enum CompletionKind:
case Empty, Scope, Members
Expand Down
Expand Up @@ -27,8 +27,8 @@ import org.eclipse.lsp4j.CompletionItemKind
import org.eclipse.lsp4j.CompletionList
import org.eclipse.lsp4j.InsertTextFormat
import org.eclipse.lsp4j.InsertTextMode
import org.eclipse.lsp4j.TextEdit
import org.eclipse.lsp4j.Range as LspRange
import org.eclipse.lsp4j.TextEdit

class CompletionProvider(
search: SymbolSearch,
Expand Down
Expand Up @@ -18,7 +18,7 @@ import dotty.tools.dotc.core.Flags.*
import dotty.tools.dotc.core.Symbols.Symbol
import dotty.tools.dotc.core.Types.Type
import dotty.tools.dotc.util.SourcePosition
import org.eclipse.{lsp4j as l}
import org.eclipse.lsp4j as l

object InterpolatorCompletions:

Expand Down
Expand Up @@ -30,7 +30,7 @@ import dotty.tools.dotc.core.Types.OrType
import dotty.tools.dotc.core.Types.Type
import dotty.tools.dotc.core.Types.TypeRef
import dotty.tools.dotc.util.SourcePosition
import org.eclipse.{lsp4j as l}
import org.eclipse.lsp4j as l

object CaseKeywordCompletion:

Expand Down
@@ -1,7 +1,7 @@
package scala.meta.internal.pc
package completions

import java.{util as ju}
import java.util as ju

import scala.collection.JavaConverters.*

Expand All @@ -15,8 +15,8 @@ import scala.meta.pc.PresentationCompilerConfig
import scala.meta.pc.PresentationCompilerConfig.OverrideDefFormat
import scala.meta.pc.SymbolSearch

import dotty.tools.dotc.ast.tpd.Tree
import dotty.tools.dotc.ast.tpd.*
import dotty.tools.dotc.ast.tpd.Tree
import dotty.tools.dotc.core.Contexts.Context
import dotty.tools.dotc.core.Flags
import dotty.tools.dotc.core.Flags.*
Expand All @@ -30,7 +30,7 @@ import dotty.tools.dotc.interactive.Interactive
import dotty.tools.dotc.interactive.InteractiveDriver
import dotty.tools.dotc.util.SourceFile
import dotty.tools.dotc.util.SourcePosition
import org.eclipse.{lsp4j as l}
import org.eclipse.lsp4j as l

object OverrideCompletions:
private type TargetDef = TypeDef | DefDef
Expand Down
Expand Up @@ -24,8 +24,8 @@ import dotty.tools.dotc.core.Names.Name
import dotty.tools.dotc.core.StdNames
import dotty.tools.dotc.core.Symbols.NoSymbol
import dotty.tools.dotc.core.Symbols.Symbol
import dotty.tools.dotc.core.Types.Type
import dotty.tools.dotc.core.Types.*
import dotty.tools.dotc.core.Types.Type

class MetalsPrinter(
names: ShortenedNames,
Expand Down

0 comments on commit 1c416ca

Please sign in to comment.