laravel-idea / plugin

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

[Feature Request]: ide.json options for autocompleting translation files with a custom namespace. #637

Open RalphMRivera opened 2 years ago

RalphMRivera commented 2 years ago

Feature Description

It would be great if Laravel Idea could auto complete language files with the __() helper based on an additional custom namespaces such as: Lang::addNamespace('Foo', base_path().'/app/Foo/Language/');

In this scenario, both the default Laravel language files and the namespace files would be available in auto-completion.

As an alternative, it would be great to add the namespace name and path to the ide.json file so that auto-completion is triggered when typing __('Foo::.

adelf commented 2 years ago

Hi, Ralph.

I can probably add support for this, without ide.json.

BTW, why addNamespace call is with 'Foo', but __('foo::, not __('Foo::?

RalphMRivera commented 2 years ago

Sorry. I made a typo. I corrected it.