File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/main/kotlin/com/emberjs/glint Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -52,13 +52,14 @@ import java.util.concurrent.Future
5252import java.util.stream.Stream
5353
5454class GlintLanguageServiceProvider (val project : Project ) : JSLanguageServiceProvider {
55+ val descriptor = getGlintDescriptor(project)
5556
5657 override fun isHighlightingCandidate (file : VirtualFile ) = file.fileType is HbFileType || file.fileType is JavaScriptFileType || file.fileType is TypeScriptFileType || file.fileType is GtsFileType
5758
58- override fun getService (file : VirtualFile ) = allServices.firstOrNull()
59+ override fun getService (file : VirtualFile ) = if (descriptor.isAvailable(file)) return GlintTypeScriptService .getInstance(project) else null
5960
6061 override val allServices: List <GlintTypeScriptService >
61- get() = if (EmberUtils .isEnabledEmberProject(project )) listOf (GlintTypeScriptService .getInstance(project)) else emptyList()
62+ get() = if (descriptor.isAvailable( )) listOf (GlintTypeScriptService .getInstance(project)) else emptyList()
6263}
6364
6465
You can’t perform that action at this time.
0 commit comments