Skip to content

Commit da0fec3

Browse files
authored
fix missing completions of component args (#273)
1 parent a2a1393 commit da0fec3

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

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

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -398,19 +398,20 @@ class HbsLocalCompletion : CompletionProvider<CompletionParameters>() {
398398
}
399399

400400
if (element.containingFile.fileType is HtmlFileType) {
401-
if (!parameters.isExtendedCompletion) return
402-
val results = service?.getCompletionItems(element.originalVirtualFile!!, document, parameters.offset, parameters)?.get()?.map {
403-
if (completionResultSet.prefixMatcher.prefix == "@") {
404-
LookupElementBuilder.create("@" + it.name)
405-
} else {
406-
LookupElementBuilder.create(it.name)
407-
}
401+
if (parameters.isExtendedCompletion) {
402+
val results = service?.getCompletionItems(element.originalVirtualFile!!, document, parameters.offset, parameters)?.get()?.map {
403+
if (completionResultSet.prefixMatcher.prefix == "@") {
404+
LookupElementBuilder.create("@" + it.name)
405+
} else {
406+
LookupElementBuilder.create(it.name)
407+
}
408408

409+
}
410+
if (results != null && results.size < 100) {
411+
completionResultSet.addAllElements(results)
412+
}
413+
return
409414
}
410-
if (results != null && results.size < 100) {
411-
completionResultSet.addAllElements(results)
412-
}
413-
return
414415
}
415416

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

0 commit comments

Comments
 (0)