laravel-idea / plugin

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

[Feature Request]: Cannot Ctrl + Click on Custom livewire component #666

Open SupachaiTho opened 1 year ago

SupachaiTho commented 1 year ago

Feature Description

https://stackoverflow.com/questions/74258656/phpstorm-does-not-recognize-livewire-custom-component

modules-livewire.php

'custom_modules' => [
        'Blog' => [
            'path' => base_path('modules/Blog/src'),
            'module_namespace' => 'Lazudi\\Blog',
             'namespace' => 'Livewire',
             'view' => 'Resources/views/livewire',
             'name_lower' => 'blog',
        ],
    ],

MainArticle.php

namespace Lazudi\Blog\Livewire\Share;

use Livewire\Component;

class MainArticle extends Component
{
...
}

something.blade

<livewire:blog::share.main-article />

Problem

I cannot Ctrl + Click on <livewire:blog::share.main-article /> to open the file MainArticle.php

Goal

Able to Ctrl + Click on every livewie components for example <livewire:blog::share.main-article />

adelf commented 1 year ago

Laravel Idea doesn't run PHP code, so it can't find all Livewire components. It tries to find and analyze Livewire::component(...); calls, however if they look like Livewire::component($alias, $class); - this probably could not be "parsed". We are working on ide.json files where you will be able to register these paths and Laravel Idea will fetch these components, but it's still not ready.

adelf commented 1 year ago

Copying Basti007's issue here, since it is the same.

Hi, there is already a support implemented for the nwidart Modules. If I want to use Livewire with the modules, I need to use an additional package https://github.com/mhmiton/laravel-modules-livewire.

Using this package, I have no auto completion in my blade files. Example: I write <livewire: and it should show livewire:basic::setup.stepper but nothing appears in the list.

LeMatosDeFuk commented 11 months ago

@adelf hello, where can we expect support for this?