Skip to content

Commit ba6efbd

Browse files
authored
fix some hbs completions
1 parent ed4996d commit ba6efbd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ class HbsLocalCompletion : CompletionProvider<CompletionParameters>() {
111111
resolve(anything.reference?.resolve(), result)
112112
}
113113

114+
if (anything is PsiElement && anything.reference == null) {
115+
val ref = anything.containingFile.originalFile.findReferenceAt(anything.textOffset)
116+
resolve((ref as HbsLocalReference?)?.resolveYield(), result)
117+
resolve(ref?.resolve(), result)
118+
}
119+
114120
if (refElement is HbParam) {
115121
if (refElement.children.find { it is HbParam }?.text == "hash") {
116122
val names = refElement.children.filter { it.elementType == HbTokenTypes.HASH }.map { it.children[0].text }

0 commit comments

Comments
 (0)