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 21, 2024
1 parent fbc44f2 commit 5208db2
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import scala.util.control.NonFatal

import scala.meta.inputs.Input
import scala.meta.inputs.Position
import scala.meta.internal.builds.SbtBuildTool
import scala.meta.internal
import scala.meta.internal.builds.SbtBuildTool
import scala.meta.internal.metals.CompilerOffsetParamsUtils
import scala.meta.internal.metals.CompilerRangeParamsUtils
import scala.meta.internal.metals.Compilers.PresentationCompilerKey
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ final class InteractiveSemanticdbs(
charset: Charset,
tables: Tables,
compilers: () => Compilers,
clientConfig: ClientConfiguration,
semanticdbIndexer: () => SemanticdbIndexer,
javaInteractiveSemanticdb: Option[JavaInteractiveSemanticdb],
buffers: Buffers,
Expand Down
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 => {
onCreate(path)
onChange(List(path))
},
)

protected def onCreate(path: AbsolutePath): Unit = {
buildTargets.onCreate(path)
compilers.didChange(path)
Expand All @@ -425,7 +392,6 @@ abstract class MetalsLspService(
charset,
tables,
() => compilers,
clientConfig,
() => semanticDBIndexer,
javaInteractiveSemanticdb,
buffers,
Expand Down Expand Up @@ -488,6 +454,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 => {
onCreate(path)
onChange(List(path))
},
)

protected val javaFormattingProvider: JavaFormattingProvider =
new JavaFormattingProvider(
buffers,
Expand Down Expand Up @@ -1663,6 +1660,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 5208db2

Please sign in to comment.