<idea-plugin xmlns:xi="http://www.w3.org/2001/XInclude">
  <xi:include href="/META-INF/analysis-api/analysis-api-impl-base.xml"/>
  <xi:include href="/META-INF/analysis-api/low-level-api-fir.xml"/>
  <xi:include href="/META-INF/analysis-api/symbol-light-classes.xml"/>

  <extensions defaultExtensionNs="com.intellij">
    <projectService
        serviceInterface="org.jetbrains.kotlin.analysis.api.session.KaSessionProvider"
        serviceImplementation="org.jetbrains.kotlin.analysis.api.fir.KaFirSessionProvider"
    />

    <projectService
        serviceInterface="org.jetbrains.kotlin.analysis.api.platform.modification.KaSourceModificationService"
        serviceImplementation="org.jetbrains.kotlin.analysis.api.fir.modification.KaFirSourceModificationService"
    />

    <projectService
        serviceInterface="org.jetbrains.kotlin.idea.references.KotlinReferenceProviderContributor"
        serviceImplementation="org.jetbrains.kotlin.analysis.api.fir.references.KotlinFirReferenceContributor"
    />

    <projectService
        serviceInterface="org.jetbrains.kotlin.idea.references.ReadWriteAccessChecker"
        serviceImplementation="org.jetbrains.kotlin.analysis.api.fir.references.ReadWriteAccessCheckerFirImpl"
    />

    <projectService
        serviceInterface="org.jetbrains.kotlin.analysis.api.imports.KaDefaultImportsProvider"
        serviceImplementation="org.jetbrains.kotlin.analysis.api.fir.KaFirDefaultImportsProvider"
    />

    <projectService
        serviceInterface="org.jetbrains.kotlin.analysis.api.platform.statistics.KaStatisticsService"
        serviceImplementation="org.jetbrains.kotlin.analysis.api.fir.statistics.KaFirStatisticsService"
    />

    <registryKey
        defaultValue="true"
        description="Perform cache clean-up when running out of RAM"
        key="kotlin.analysis.lowMemoryCacheCleanup"
        restartRequired="true"
    />

    <registryKey
        defaultValue="false"
        description="Enables post-compute-based Java Functions Cache (should be used only when data race is detected with less strict version)"
        key="kotlin.analysis.postComputeEnhancedJavaFunctionsCache"
        restartRequired="true"
    />

    <registryKey
        defaultValue="true"
        description="When compiling against kotlin-stdlib sources (in the Kotlin compiler project), substitute sources with compiled binaries"
        key="kotlin.analysis.compilerFacility.useStdlibBuildOutput"
        restartRequired="true"
    />
  </extensions>

  <extensions defaultExtensionNs="org.jetbrains.kotlin">
    <kotlinContentScopeRefiner implementation="org.jetbrains.kotlin.analysis.api.fir.projectStructure.KaFirLibraryTargetPlatformContentScopeRefiner"/>
  </extensions>

  <projectListeners>
    <listener
        class="org.jetbrains.kotlin.analysis.api.fir.KaFirSessionProvider$SessionInvalidationListener"
        topic="org.jetbrains.kotlin.analysis.low.level.api.fir.sessions.LLFirSessionInvalidationListener"
    />
  </projectListeners>
</idea-plugin>
