From 7bad173c7f840e72f6e28fa6893db572e73053b6 Mon Sep 17 00:00:00 2001 From: Daniel Espendiller Date: Sat, 2 Mar 2024 13:19:11 +0100 Subject: [PATCH] prevent twig template asset to be handled twice --- .../templating/TwigTemplateCompletionContributor.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/fr/adrienbrault/idea/symfony2plugin/templating/TwigTemplateCompletionContributor.java b/src/main/java/fr/adrienbrault/idea/symfony2plugin/templating/TwigTemplateCompletionContributor.java index b0b524b41..e235960c1 100644 --- a/src/main/java/fr/adrienbrault/idea/symfony2plugin/templating/TwigTemplateCompletionContributor.java +++ b/src/main/java/fr/adrienbrault/idea/symfony2plugin/templating/TwigTemplateCompletionContributor.java @@ -1335,7 +1335,8 @@ private static class PhpProxyForTwigTypCompletionProvider extends CompletionProv @Override protected void addCompletions(@NotNull CompletionParameters parameters, @NotNull ProcessingContext context, @NotNull CompletionResultSet result) { PsiElement prevSibling = PsiElementUtils.getPrevSiblingOfType(parameters.getPosition(), PlatformPatterns.psiElement(TwigTokenTypes.IDENTIFIER)); - if (prevSibling == null) { + // "asset" are already known + if (prevSibling == null || "asset".equals(prevSibling.getText())) { return; }