Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Twig] Auto-complete macro's imported from inside of another macro #419

Closed
vladcosorg opened this issue Jan 15, 2015 · 1 comment
Closed
Labels

Comments

@vladcosorg
Copy link

{% macro foo() %}
{% endmacro %}

{% macro breadcrumb(parts) %}
    {% import _self as bar %}
    {{ bar. // NO COMPLETION }}
{% endmacro %}
@Haehnchen Haehnchen added the todo label Jan 15, 2015
@Haehnchen Haehnchen changed the title Auto-complete macro's imported from inside of another macro [Twig] Auto-complete macro's imported from inside of another macro May 10, 2015
Haehnchen added a commit that referenced this issue Jun 7, 2015
@Haehnchen Haehnchen added fixed and removed todo labels Jun 7, 2015
@jonesiscoding
Copy link

While the _self syntax now works, importing other templates with macros does not seem to provide autocomplete:

{% macro foo(parts) %}
  {% import 'AppBundle:Macros:barMacros.html.twig' as bar %}
  {{ bar. // NO COMPLETION }}
{% endmacro %}

You can, however, import a single macro, and get autocomplete:

{% macro foo(parts) %}
    {% from 'AppBundle:Macros:barMacros.html.twig' import bar %}
    {{ bar. // THIS WORKS }}
{% endmacro %}

Using Symfony2, Symfony2 Plugin v0.11.95, PHPStorm 9.0 (141.1912)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants