Skip to content

Commit

Permalink
post rebase fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kasiaMarek committed May 20, 2024
1 parent 592e891 commit 3321128
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,6 @@ abstract class MetalsLspService(
ReportLevel.fromString(MetalsServerConfig.default.loglevel),
)

val folderReportsZippper: FolderReportsZippper =
FolderReportsZippper(doctor, reports)

def javaHome = userConfig.javaHome
protected val optJavaHome: Option[AbsolutePath] =
JdkSources.defaultJavaHome(javaHome).headOption
Expand Down Expand Up @@ -360,16 +357,6 @@ abstract class MetalsLspService(
)
}

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

protected val formattingProvider: FormattingProvider = new FormattingProvider(
folder,
buffers,
Expand All @@ -389,26 +376,6 @@ abstract class MetalsLspService(
semanticdbs,
)

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

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

protected val interactiveSemanticdbs: InteractiveSemanticdbs = {
val javaInteractiveSemanticdb = maybeJdkVersion.map(jdkVersion =>
JavaInteractiveSemanticdb.create(folder, buildTargets, jdkVersion)
Expand Down Expand Up @@ -483,6 +450,37 @@ abstract class MetalsLspService(
)
)

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

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

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

protected val javaFormattingProvider: JavaFormattingProvider =
new JavaFormattingProvider(
buffers,
Expand Down Expand Up @@ -1658,6 +1656,9 @@ abstract class MetalsLspService(
() => projectInfo,
)

val folderReportsZippper: FolderReportsZippper =
FolderReportsZippper(doctor, reports)

protected def check(): Unit = {
doctor.check(headDoctor)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ import scala.meta.internal.semanticdb.Synthetic
import scala.meta.internal.semanticdb.TextDocument
import scala.meta.internal.semanticdb.TextDocuments
import scala.meta.internal.semanticdb.XtensionSemanticdbSymbolInformation
import scala.meta.internal.tokenizers.LegacyScanner
import scala.meta.internal.tokenizers.LegacyToken._
import scala.meta.internal.{semanticdb => s}
import scala.meta.io.AbsolutePath

Expand Down

0 comments on commit 3321128

Please sign in to comment.