adalessa / laravel.nvim

Plugin for Nvim to work with laravel projects.
MIT License
298 stars 17 forks source link

Error when picking route in `Laravel routes`-picker #121

Open mimre25 opened 6 days ago

mimre25 commented 6 days ago

When I'm using the Laravel routes command I get the telescope picker including the "preview" with the route information. However, upon choosing an entry (hitting enter in my case), I get the following error and remain in the same file as I was before.

Error executing vim.schedule lua callback: ...l/share/nvim/lazy/laravel.nvim/lua/laravel/_lsp/init.lua:19: attempt to call f
ield 'make_config' (a nil value)
stack traceback:
        ...l/share/nvim/lazy/laravel.nvim/lua/laravel/_lsp/init.lua:19: in function 'get_client'
        ...l/share/nvim/lazy/laravel.nvim/lua/laravel/_lsp/init.lua:41: in function 'go_to'
        ...lazy/laravel.nvim/lua/laravel/pickers/common/actions.lua:29: in function 'go'
        ...lazy/laravel.nvim/lua/laravel/pickers/common/actions.lua:40: in function <...lazy/laravel.nvim/lua/laravel/picker
s/common/actions.lua:39>

I assume the intended behavior is to navigate to the file the route is defined in.

I'm getting the same error when using Laravel related.

adalessa commented 2 days ago

@mimre25 The feature to find the class uses the lsp to find it. This is a bit different from PhpActor and Intelephense. Which one are you using ?

mimre25 commented 1 day ago

I'm using Intelephense these days, as I feel it's working better with laravel than PhpActor.