Skip to content

Commit

Permalink
fixes after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
kasiaMarek committed Mar 15, 2024
1 parent 9d9e067 commit 8db6722
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion metals-bench/src/main/scala/bench/MetalsBench.scala
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class MetalsBench {
@Benchmark
@BenchmarkMode(Array(Mode.SingleShotTime))
def typeHierarchyIndex(): Unit = {
scalaDependencySources.inputs.foreach { input =>
scalaDependencySources.inputs.foreach { case (input, _) =>
implicit val rc: ReportContext = EmptyReportContext
new ScalaToplevelMtags(
input,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ import scala.meta.pc.OffsetParams
import scala.meta.pc.PresentationCompiler
import scala.meta.pc.SymbolSearch
import scala.meta.pc.SyntheticDecorationsParams
import scala.meta.pc.SyntheticDecoration
import scala.meta.pc.VirtualFileParams

import ch.epfl.scala.bsp4j.BuildTargetIdentifier
import ch.epfl.scala.bsp4j.CompileReport
import org.eclipse.lsp4j.CompletionItem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,16 +517,6 @@ class MetalsLspService(
)
}

private val referencesProvider: ReferenceProvider = new ReferenceProvider(
folder,
semanticdbs,
buffers,
definitionProvider,
trees,
buildTargets,
compilers,
)

private val formattingProvider: FormattingProvider = new FormattingProvider(
folder,
buffers,
Expand All @@ -545,26 +535,6 @@ class MetalsLspService(
semanticdbs,
)

private val packageProvider: PackageProvider =
new PackageProvider(
buildTargets,
trees,
referencesProvider,
buffers,
definitionProvider,
)

private val newFileProvider: NewFileProvider = new NewFileProvider(
languageClient,
packageProvider,
scalaVersionSelector,
clientConfig.icons,
onCreate = path => {
buildTargets.onCreate(path)
onChange(List(path))
},
)

private val symbolSearch: MetalsSymbolSearch = new MetalsSymbolSearch(
symbolDocs,
workspaceSymbols,
Expand Down Expand Up @@ -597,7 +567,7 @@ class MetalsLspService(
)
}

private val compilers: Compilers = register(
val compilers: Compilers = register(
new Compilers(
folder,
clientConfig,
Expand All @@ -618,6 +588,37 @@ class MetalsLspService(
)
)

private val referencesProvider: ReferenceProvider = new ReferenceProvider(
folder,
semanticdbs,
buffers,
definitionProvider,
trees,
buildTargets,
compilers,
scalaVersionSelector,
)

private val packageProvider: PackageProvider =
new PackageProvider(
buildTargets,
trees,
referencesProvider,
buffers,
definitionProvider,
)

private val newFileProvider: NewFileProvider = new NewFileProvider(
languageClient,
packageProvider,
scalaVersionSelector,
clientConfig.icons,
onCreate = path => {
buildTargets.onCreate(path)
onChange(List(path))
},
)

private val javaFormattingProvider: JavaFormattingProvider =
new JavaFormattingProvider(
buffers,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ import scala.concurrent.ExecutionContextExecutor
import scala.jdk.CollectionConverters._

import scala.meta.internal.metals.ReportLevel
import scala.meta.internal.mtags.CommonMtagsEnrichments.*
import scala.meta.internal.mtags.CommonMtagsEnrichments._
import scala.meta.pc.AutoImportsResult
import scala.meta.pc.Buffers
import scala.meta.pc.DefinitionResult
import scala.meta.pc.HoverSignature
import scala.meta.pc.InlayHintsParams
import scala.meta.pc.Node
import scala.meta.pc.OffsetParams
import scala.meta.pc.PcSymbolInformation
import scala.meta.pc.PcAdjustFileParams
import scala.meta.pc.PcSymbolInformation
import scala.meta.pc.PresentationCompiler
import scala.meta.pc.PresentationCompilerConfig
import scala.meta.pc.RangeParams
Expand Down

0 comments on commit 8db6722

Please sign in to comment.