laravel-idea / plugin

Laravel Idea plugin for PhpStorm
https://laravel-idea.com/
177 stars 7 forks source link

[Feature Request]: Twig clickthrough to included views #749

Open mbardelmeijer opened 1 year ago

mbardelmeijer commented 1 year ago

Feature Description

With 7.0, we finally got Twig support, which we are very happy with!

We do run into the click-ability of the includes. We define our twig templates in a bit of different syntax, which isn't clickable. Example:

Works:

{% include "purchase.partials.city" %}

Doesn't work:

{% include "purchase/partials/city.twig" %}
adelf commented 1 year ago

Could you try to go to the Settings > Language & Frameworks > Laravel Idea > Views and change view name delimiter to Slashes and remove .twig view file suffix. This will make GoTo working and completion should also work as you want.

mbardelmeijer commented 1 year ago

Sorry for the late reply here, lost track of this.

Thanks, that did the trick there! Is there any way to support both variants, i.e., a include with a .twig suffix and without? We have many multiple projects, some of which both use the .twig suffix and no suffix. :)