Closed yaegassy closed 1 year ago
Blade:
https://github.com/yaegassy/coc-laravel/assets/188642/2350f3c1-9211-4c80-a0ea-59bbc49223b5
Note!!: This feature has been refactored as Component Completion
https://github.com/yaegassy/coc-laravel/assets/188642/09b143d8-b066-4279-b70c-85aa589aa79d
Note!!: This feature has been refactored as Component Completion
https://github.com/yaegassy/coc-laravel/assets/188642/43221895-4166-49c1-bd75-7adc01d5aa15
phpstorm-stubs
. By default standard
, date
, and Core
are parsed. Can be changed by setting laravel.stubs.useStubs
.vendor
directory. Functions with namespaces are also supported. You can also exclude a specific vendor in the laravel.project.excludeVendors
settings.https://github.com/yaegassy/coc-laravel/assets/188642/e98757bd-5c0b-4089-842f-5b6609503c5d
https://github.com/yaegassy/coc-laravel/assets/188642/539ae7ba-11a7-4fd4-9f65-ef2ec40d040a
https://github.com/yaegassy/coc-laravel/assets/188642/1b6753e9-8bb7-4259-9172-b82e983a068c
Setting items related to this feature:
laravel.livewire.wireClickAttributes
: List of click related action to be added to wire:xxxx
, default: ["click", "click.prefetch"]
laravel.livewire.wireModelAttributes
: List of model related action to be added to wire:xxxx
, default: ["model", "model.debounce.100ms", "model.lazy", "model.defer"]
https://github.com/yaegassy/coc-laravel/assets/188642/3ff0072c-2fae-40ae-a5c4-074b2c2678b9
Setting items related to this feature:
laravel.livewire.wireEventAttributes
: List of browser events to be added to wire:xxxx
. No need for wire:model
or wire:click
. default: Omitted due to the large number of settings..., See configuration in package.jsonhttps://github.com/yaegassy/coc-laravel/assets/188642/e85c8aab-cb3e-4271-86b1-9312c7af2007
https://github.com/yaegassy/coc-laravel/assets/188642/596dee19-310e-4392-8171-490a1808dfd8
https://github.com/yaegassy/coc-laravel/assets/188642/b3999196-4757-4043-925f-3f3c9d5c76b8
phpstorm-stubs
. By default standard
, date
, and Core
are parsed. Can be changed by setting laravel.stubs.useStubs
.vendor
directory. This includes class
, interface
, trait
, and enum
. You can also exclude a specific vendor in the laravel.project.excludeVendors
settings.https://github.com/yaegassy/coc-laravel/assets/188642/91f5fc92-9fcd-48fc-a88c-535a06535bca
phpstorm-stubs
. By default standard
, date
, and Core
are parsed. Can be changed by setting laravel.stubs.useStubs
.vendor
directory. You can also exclude a specific vendor in the laravel.project.excludeVendors
settings.Complementary items are displayed by entering ::
in the class. e.g. DateTime::|
.
This feature uses PHP's ReflectionAPI in the background, so PHP in your environment must be able to run correctly.
https://github.com/yaegassy/coc-laravel/assets/188642/6f8994eb-647a-465e-8f4c-1d3c42d07ad2
this completion feature of variables or objects defined in inline-php region (<?php ... ?>
) and php-directive region (@php ... @endphp
) in the blade file. Variables defined above the current cursor position are targeted.
The details that are displayed when a completion item is selected are displayed using PHP reflection in the case of an object to identify what kind of object it is.
As a side note, there are other php-related regions in the blade file besides inline-php and php-directive, but I thought that I wouldn't define variables there, so I don't support them at the moment. The processing also needs a bit of work.
https://github.com/yaegassy/coc-laravel/assets/188642/daaa98a8-da33-4808-a3da-243b4d9ffeec
https://github.com/yaegassy/coc-laravel/assets/188642/156c20dd-e822-4d74-8171-1fc33906bca0
Completion feature using _ide_helper_models.php
file generated by laravel-ide-helper
https://github.com/yaegassy/coc-laravel/assets/188642/ac007274-c5fd-4448-87c7-806a9042971c
This feature completes the variables specified in the view
function of the php file with the blade file. Variables passed in with
method can also be completed.
Unfortunately, the use of the compact
function cannot be completed at this time.
https://github.com/yaegassy/coc-laravel/assets/188642/19771bed-3efa-485d-bc46-733679bd84f7
Config completion
PHP:
https://github.com/yaegassy/coc-laravel/assets/188642/3ccf8f43-25e7-4c67-8a13-c0e23ab1a581
Blade:
https://github.com/yaegassy/coc-laravel/assets/188642/59c26c21-b18a-40aa-bedc-21cea5639d8f