Skip to content

Commit 64084c1

Browse files
committed
fix
1 parent e894965 commit 64084c1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/kotlin/com/emberjs/glint/GlintLanguageService.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import com.dmarcotte.handlebars.file.HbFileType
44
import com.dmarcotte.handlebars.psi.HbPsiFile
55
import com.emberjs.gts.GtsFileType
66
import com.emberjs.hbs.EmberReference
7-
import com.emberjs.utils.EmberUtils
87
import com.emberjs.utils.originalVirtualFile
98
import com.intellij.codeInsight.completion.CompletionParameters
109
import com.intellij.codeInsight.intention.IntentionAction
@@ -26,7 +25,6 @@ import com.intellij.lang.parameterInfo.CreateParameterInfoContext
2625
import com.intellij.lang.typescript.compiler.TypeScriptService
2726
import com.intellij.lang.typescript.compiler.languageService.TypeScriptLanguageServiceUtil
2827
import com.intellij.lang.typescript.compiler.languageService.codeFixes.TypeScriptSuppressByCommentFix
29-
import com.intellij.lang.typescript.languageService.TypeScriptServiceProvider
3028
import com.intellij.lang.typescript.lsp.BaseLspTypeScriptService
3129
import com.intellij.lang.typescript.lsp.LspAnnotationError
3230
import com.intellij.openapi.diagnostic.Logger
@@ -52,11 +50,13 @@ import java.util.concurrent.CompletableFuture.completedFuture
5250
import java.util.concurrent.Future
5351
import 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

Comments
 (0)