@@ -21,7 +21,7 @@ import java.nio.file.Paths
2121import java.util.concurrent.CompletableFuture
2222import java.util.concurrent.CompletableFuture.completedFuture
2323
24- class KotlinLanguageServer : LanguageServer , LanguageClientAware , Closeable {
24+ class KotlinLanguageServer : LanguageServer , Closeable {
2525 val config = Configuration ()
2626 val classPath = CompilerClassPath (config.compiler)
2727
@@ -34,7 +34,7 @@ class KotlinLanguageServer : LanguageServer, LanguageClientAware, Closeable {
3434 private val workspaces = KotlinWorkspaceService (sourceFiles, sourcePath, classPath, textDocuments, config)
3535 private val protocolExtensions = KotlinProtocolExtensionService (uriContentProvider)
3636
37- private lateinit var client: LanguageClient
37+ private lateinit var client: KotlinLanguageClient
3838
3939 private val async = AsyncExecutor ()
4040 private var progressFactory: Progress .Factory = Progress .Factory .None
@@ -51,7 +51,7 @@ class KotlinLanguageServer : LanguageServer, LanguageClientAware, Closeable {
5151 LOG .info(" Kotlin Language Server: Version ${VERSION ? : " ?" } " )
5252 }
5353
54- override fun connect (client : LanguageClient ) {
54+ fun connect (client : KotlinLanguageClient ) {
5555 this .client = client
5656 connectLoggingBackend()
5757
@@ -132,6 +132,10 @@ class KotlinLanguageServer : LanguageServer, LanguageClientAware, Closeable {
132132 InitializeResult (serverCapabilities, serverInfo)
133133 }
134134
135+ override fun initialized (params : InitializedParams ? ) {
136+ client.buildOutputLocationSet(classPath.outputDirectory.absolutePath)
137+ }
138+
135139 private fun connectLoggingBackend () {
136140 val backend: (LogMessage ) -> Unit = {
137141 client.logMessage(MessageParams ().apply {
0 commit comments