diff --git a/idea/resources/META-INF/plugin-common.xml b/idea/resources/META-INF/plugin-common.xml index 107b2da98f1..eef0bc80864 100644 --- a/idea/resources/META-INF/plugin-common.xml +++ b/idea/resources/META-INF/plugin-common.xml @@ -863,6 +863,8 @@ + + org.jetbrains.kotlin.idea.intentions.FoldInitializerAndIfToElvisIntention Kotlin diff --git a/idea/src/org/jetbrains/kotlin/idea/KotlinLanguageSubstitutor.kt b/idea/src/org/jetbrains/kotlin/idea/KotlinLanguageSubstitutor.kt new file mode 100644 index 00000000000..5b145296625 --- /dev/null +++ b/idea/src/org/jetbrains/kotlin/idea/KotlinLanguageSubstitutor.kt @@ -0,0 +1,22 @@ +/* + * Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.idea + +import com.intellij.lang.Language +import com.intellij.openapi.fileTypes.PlainTextLanguage +import com.intellij.openapi.project.Project +import com.intellij.openapi.vfs.VirtualFile +import com.intellij.psi.LanguageSubstitutor + +class KotlinLanguageSubstitutor : LanguageSubstitutor() { + override fun getLanguage(file: VirtualFile, project: Project): Language? { + val name = file.name + if (name.endsWith(".kt.ft")) { + return PlainTextLanguage.INSTANCE + } + return null + } +} \ No newline at end of file