yaegassy / coc-laravel

Laravel extension for coc.nvim
https://www.npmjs.com/package/@yaegassy/coc-laravel
MIT License
28 stars 2 forks source link

[DEMO] Completion Features #1

Closed yaegassy closed 1 year ago

yaegassy commented 1 year ago

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

yaegassy commented 1 year ago

Env completion

PHP:

https://github.com/yaegassy/coc-laravel/assets/188642/f0a0bd29-958e-4dbc-9fa8-b5dfc50d796c

Blade:

https://github.com/yaegassy/coc-laravel/assets/188642/6cb32ff8-e1ca-4f32-90e5-58740a09b145

yaegassy commented 1 year ago

Validation completion

https://github.com/yaegassy/coc-laravel/assets/188642/8c775e92-e642-4cfa-9d20-a85a60fff981

yaegassy commented 1 year ago

Route completion

PHP:

https://github.com/yaegassy/coc-laravel/assets/188642/15854a8a-28cf-400c-92fb-79adfe0abfe6

Blade:

https://github.com/yaegassy/coc-laravel/assets/188642/47e61640-314e-40cd-90aa-09781ad7dd71

yaegassy commented 1 year ago

View completion

PHP:

https://github.com/yaegassy/coc-laravel/assets/188642/9305144a-9527-495b-a96a-1aa510633640

Blade:

https://github.com/yaegassy/coc-laravel/assets/188642/0a1cbfea-691b-4e8f-bf9a-fe29168f7862

yaegassy commented 1 year ago

Middleware completion

https://github.com/yaegassy/coc-laravel/assets/188642/5e17383b-d386-426b-a55f-7c79783e9de9

yaegassy commented 1 year ago

Guard completion

PHP:

https://github.com/yaegassy/coc-laravel/assets/188642/5787c49c-fffa-46d3-8fca-2f345c7bedfa

Blade:

https://github.com/yaegassy/coc-laravel/assets/188642/699b2db7-82eb-448d-b90f-274c21124b4a

yaegassy commented 1 year ago

Translation Completion

Blade:

https://github.com/yaegassy/coc-laravel/assets/188642/2350f3c1-9211-4c80-a0ea-59bbc49223b5

yaegassy commented 1 year ago

ComponentTag Completion

Note!!: This feature has been refactored as Component Completion

https://github.com/yaegassy/coc-laravel/assets/188642/09b143d8-b066-4279-b70c-85aa589aa79d

yaegassy commented 1 year ago

ComponentProps Completion

Note!!: This feature has been refactored as Component Completion

https://github.com/yaegassy/coc-laravel/assets/188642/43221895-4166-49c1-bd75-7adc01d5aa15

yaegassy commented 1 year ago

PHP Function Completion

https://github.com/yaegassy/coc-laravel/assets/188642/e98757bd-5c0b-4089-842f-5b6609503c5d

yaegassy commented 1 year ago

Method directive parameter completion

https://github.com/yaegassy/coc-laravel/assets/188642/539ae7ba-11a7-4fd4-9f65-ef2ec40d040a

yaegassy commented 1 year ago

Component Completion

https://github.com/yaegassy/coc-laravel/assets/188642/f64d207e-82db-48ac-8ea3-41f7497996cf

yaegassy commented 1 year ago

Directive completion

https://github.com/yaegassy/coc-laravel/assets/188642/14c87529-8534-45ee-9cfe-3631d99415fd

yaegassy commented 1 year ago

Livewire tag completion

https://github.com/yaegassy/coc-laravel/assets/188642/1b6753e9-8bb7-4259-9172-b82e983a068c

yaegassy commented 1 year ago

Livewire action completion

Setting items related to this feature:

https://github.com/yaegassy/coc-laravel/assets/188642/3ff0072c-2fae-40ae-a5c4-074b2c2678b9

yaegassy commented 1 year ago

Livewire event completion

Setting items related to this feature:

https://github.com/yaegassy/coc-laravel/assets/188642/e85c8aab-cb3e-4271-86b1-9312c7af2007

yaegassy commented 1 year ago

Livewire directive completion

https://github.com/yaegassy/coc-laravel/assets/188642/596dee19-310e-4392-8171-490a1808dfd8

yaegassy commented 1 year ago

Livewire property completion

https://github.com/yaegassy/coc-laravel/assets/188642/b3999196-4757-4043-925f-3f3c9d5c76b8

yaegassy commented 1 year ago

PHP Class Completion

https://github.com/yaegassy/coc-laravel/assets/188642/91f5fc92-9fcd-48fc-a88c-535a06535bca

yaegassy commented 1 year ago

PHP Constant completion

yaegassy commented 1 year ago

PHP Keyword completion

yaegassy commented 1 year ago

PHP Static Class completion

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

yaegassy commented 1 year ago

PHP Variable completion

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

yaegassy commented 1 year ago

PHP Object Member completion

https://github.com/yaegassy/coc-laravel/assets/188642/156c20dd-e822-4d74-8171-1fc33906bca0

yaegassy commented 1 year ago

Eloquent Model Field completion

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

yaegassy commented 1 year ago

View Reference Variable completion

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