RicardoRamirezR / blade-nav.nvim

Navigating Blade views within Laravel projects
MIT License
56 stars 7 forks source link

Completion Issues #32

Open frugene opened 2 weeks ago

frugene commented 2 weeks ago

There are no completion of php code when in @php directive and {{}}. Does this support livewire? Can there be an implementation? Is there already a plugin for above issues?

BUG: I don't know if it really is a bug or not but when a completion is provided by blade-nav, there are two entries of the suggestion.

RicardoRamirezR commented 2 weeks ago

@frugene, please provide an code example of the issue.

For the questions take a look at the readme numeral 4

frugene commented 2 weeks ago

I see it does support livewire but there is no completion of php code when in @php directive and {{}} (blade echo).

For eg:

@php
{{--There is no completion here for php code.--}}
@enphp
<p data={{somevariable}}>Hello</p> -> there is no completion for somevariable even if somevariable was passed to the view
frugene commented 2 weeks ago

For the questions take a look at the readme numeral 4

I have looked at it but for this issue:

There are no completion of php code when in https://github.com/php directive and {{}}.

There is no help

RicardoRamirezR commented 2 weeks ago

Ahh I see @frugene. The completion is for components only.

frugene commented 2 weeks ago

Oo ok. But do you have any idea how to get those autocomplete. If there are plugins or i should write login for attaching the lsp buffer of php inside @php directive and {{}}.

RicardoRamirezR commented 2 weeks ago

I do not know, may be phpactor...

monooso commented 2 days ago

@RicardoRamirezR Possibly related, after installing this plugin Intelephense autocompletion stopped working. Not just in Blade files, but in pure PHP files as well. I'm assuming this is because I have ft = {'blade', 'php'}, as per the setup instructions.

My guess is that this has something to do with the cmp.lua file, but that's just a theory at this point.

Were it not for Laravel Folio and Livewire Volt, I could probably work around this by setting ft = {'blade'}. As it stands, I have to choose between Blade completion / navigation, and PHP completion. Not surprisingly, the latter wins.

Thanks for all your work on this.