Skip to content

Add template completion using ide-twig.json - #126

Open
lukasbableck wants to merge 1 commit into
mblode:masterfrom
lukasbableck:feature/ide-twig-support
Open

lukasbableck wants to merge 1 commit into
mblode:masterfrom
lukasbableck:feature/ide-twig-support

Conversation

@lukasbableck

@lukasbableck lukasbableck commented Oct 8, 2026 •

Copy link
Copy Markdown

This PR adds Twig template-name completion using ide-twig.json, a format already supported by PhpStorm’s Symfony/Twig tooling.

Some applications/frameworks, like Contao, generate the ide-twig.json file automatically.
But it can also be created manually for regular Symfony projects or other frameworks, making the feature framework-independent.

  • Completes namespaced and plain template paths in Twig template tags and include() / source(), including fallback arrays.
  • Supports a configurable config-file location and resolves template directories relative to that file.
  • Refreshes completions when configuration or template files change.

An example how this can look in practice:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant