@@ -4,7 +4,6 @@ import com.dmarcotte.handlebars.file.HbFileType
44import com.dmarcotte.handlebars.psi.HbPsiFile
55import com.emberjs.gts.GtsFileType
66import com.emberjs.hbs.EmberReference
7- import com.emberjs.utils.EmberUtils
87import com.emberjs.utils.originalVirtualFile
98import com.intellij.codeInsight.completion.CompletionParameters
109import com.intellij.codeInsight.intention.IntentionAction
@@ -26,7 +25,6 @@ import com.intellij.lang.parameterInfo.CreateParameterInfoContext
2625import com.intellij.lang.typescript.compiler.TypeScriptService
2726import com.intellij.lang.typescript.compiler.languageService.TypeScriptLanguageServiceUtil
2827import com.intellij.lang.typescript.compiler.languageService.codeFixes.TypeScriptSuppressByCommentFix
29- import com.intellij.lang.typescript.languageService.TypeScriptServiceProvider
3028import com.intellij.lang.typescript.lsp.BaseLspTypeScriptService
3129import com.intellij.lang.typescript.lsp.LspAnnotationError
3230import com.intellij.openapi.diagnostic.Logger
@@ -52,11 +50,13 @@ import java.util.concurrent.CompletableFuture.completedFuture
5250import java.util.concurrent.Future
5351import java.util.stream.Stream
5452
55- class GlintLanguageServiceProvider (val project : Project ) : TypeScriptServiceProvider() {
53+ class GlintLanguageServiceProvider (val project : Project ) : JSLanguageServiceProvider {
5654 val descriptor = getGlintDescriptor(project)
5755
5856 override fun isHighlightingCandidate (file : VirtualFile ) = file.fileType is HbFileType || file.fileType is JavaScriptFileType || file.fileType is TypeScriptFileType || file.fileType is GtsFileType
5957
58+ override fun getService (file : VirtualFile ) = if (descriptor.isAvailable(file)) GlintTypeScriptService .getInstance(project) else null
59+
6060 override val allServices: List <GlintTypeScriptService >
6161 get() = if (descriptor.isAvailable(null )) listOf (GlintTypeScriptService .getInstance(project)) else emptyList()
6262}
0 commit comments