Skip to content

Commit c82599c

Browse files
authored
show only correct component args (#298)
1 parent f0acf23 commit c82599c

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/main/kotlin/com/emberjs/hbs/HbsLocalCompletion.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ import com.intellij.psi.util.PsiTreeUtil
4444
import com.intellij.psi.util.elementType
4545
import com.intellij.psi.util.isAncestor
4646
import com.intellij.psi.xml.XmlAttribute
47+
import com.intellij.psi.xml.XmlTag
4748
import com.intellij.refactoring.suggested.startOffset
4849
import com.intellij.util.ProcessingContext
4950
import java.util.function.Predicate
@@ -434,6 +435,9 @@ class HbsLocalCompletion : CompletionProvider<CompletionParameters>() {
434435
}
435436
return
436437
}
438+
if (element.parent is XmlTag) {
439+
return
440+
}
437441
}
438442

439443
val result: MutableList<LookupElement> = mutableListOf()

src/main/kotlin/com/emberjs/utils/EmberUtils.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,10 @@ class EmberUtils {
413413
return followReferences(elem)
414414
}
415415

416+
if (element is TypeScriptTypeofType) {
417+
return followReferences(element.expression?.reference?.resolve())
418+
}
419+
416420
if (element is ES6ImportSpecifier) {
417421
val results = element.multiResolve(false)
418422
val internal = (element.parent.parent as ES6ImportDeclarationImpl).fromClause?.references?.find { it is EmberInternalJSModuleReference } as? EmberInternalJSModuleReference

0 commit comments

Comments
 (0)