yaegassy / coc-laravel

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

feat: php variable completion #12

Closed yaegassy closed 1 year ago

yaegassy commented 1 year ago

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/1f9ec977-47f9-4650-9463-c97114049dbb