adalessa / laravel.nvim

Plugin for Nvim to work with laravel projects.
MIT License
235 stars 13 forks source link

Going to a route doesn't work when using intelephense #37

Closed WhoSayIn closed 1 year ago

WhoSayIn commented 1 year ago

I get the following error when I try to go to a route through telescope (running :Laravel routes)

Even though it lists all the routes that I have, I only get this when I try to go to a route.

I switched to phpactor just to see if it works, and it works fine with phpactor. But I personally would love to keep intelephense as my lsp server.

Client 1 quit with exit code 1 and signal 0                                                                                                                                               
Error executing vim.schedule lua callback: ...ker/start/laravel.nvim/lua/laravel/_lsp/intelephense.lua:16: attempt to index local 'resp' (a nil value)
stack traceback:
        ...ker/start/laravel.nvim/lua/laravel/_lsp/intelephense.lua:16: in function 'go_to'
        ...te/pack/packer/start/laravel.nvim/lua/laravel/routes.lua:32: in function 'go_to'
        ...start/laravel.nvim/lua/telescope/_extensions/laravel.lua:206: in function <...start/laravel.nvim/lua/telescope/_extensions/laravel.lua:205>
dorkster100 commented 1 year ago

I am using intelephense for this, but I am on an older version of laravel. Can you provide some example routes?

WhoSayIn commented 1 year ago

Hmm, I can't explain what happened, but now it seems to work. I didn't do anything. I'll close the issue, thanks for your reply.

To give more context, yesterday I just installed this extension and tried it for the first time. Everything worked except "going to a route". Now that also seems to be working fine.

Sorry for the noise :)

adalessa commented 1 year ago

No problem. if it happen again please report it.

dorkster100 commented 1 year ago

i think i had this issue for a second and it disappeared, if it occurs again i will try to debug

adalessa commented 1 year ago

I think could it be the lsp not completely ready to answer and returning empty.