-
-
Notifications
You must be signed in to change notification settings - Fork 137
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
[Feature request] Twig var autocomplete #31
Comments
How is that supposed to work ? A template can be called from many different places and variables could contain objects, arrays ... etc |
Its working somehow in eclipse plugin: https://github.com/pulse00/Symfony-2-Eclipse-Plugin |
And all available variables are stored in _context variable. You can dump, for example, to see them: |
the plugin only search for the matching shortcut controllermethod of the twig file and resolve the return statement, so no magical stuff :) |
@hhamon suggested on twitter to autocomplete |
All default
You can also add new globals by tweaking the
In this case you can do You can also add globals from Twig extensions classes, but for these ones, I don't think we can easily guess them from the IDE. |
i was trying it before, but there is no "type" support in twig of phpstorm. just giving dont forget services:
|
Be careful. @hhamon was wrong. Setting a |
Good catch! |
…#}, currently parser support inline blocks and global "app" #31
so globals are in and more ... {# variable_name \Foo\Bar #} |
Still dont work - 0.11.92 in PHPStorm 141.1408 I'd tried add this in yml files for all environments with/out includes (also we have changed path to cache folder - app/cache/dev/appDevDebugProjectContainer.xml actually in app/var/cache/dev/myruDevDebugProjectContainer.xml)
No suggest for
and "Can't find declaration". |
app/var/cache/dev/myruDevDebugProjectContainer.xml contains
symfony 2.0.* |
The text was updated successfully, but these errors were encountered: