blade lsp is not activating
hellooo sorry to bother big fan of ryour nvim config but i got a problem with the blade lsp which for some reason is not working idk if is the intelisense because for normal php works perfectly, i have installed laravel, php, composer and everything i think i need to run it, i open it even using sudo but the lsp doesnt activate for some reason hope you can help me cause this config is really cool ;D
Sometimes, when i use s after starting nvim, this happens for me, too.
If that is not the case, you could try adding blade to your nvim-lpsconfig:
See here for the config spec and here for the file that needs to be adjusted.
Let me know if that works for you / open a pr if it does :)
Just tried and realised it is broken for me, too. My suggested fix did not help yet, I'll look into it.
Found the issue, it seems that blade as a language causes this, as for some reason, the LSP fails with it now:
[WARN][2023-12-13 07:51:50] ...lsp/handlers.lua:537 "textDocument/didOpen ignored. file:///Users/.../resources/views/pages/links/index.blade.php has unsupported language ID blade."
The fix is to just remove blade as an additional language, so nvim sees it as php. I have no idea why. It might be due to the upcoming release of blade support, thanks to treesitter-blade.
I'll see if removing it has any consequences I am not aware of and push the new version asap. Thanks for noticing!
Hi there, I tried to just use nvim-lspconfig to get it to work, but it didn't. We now have two hacky autocommands that trick intelephense into thinking it's in php, then switch back to blade. This way everything works.
If anyone knows if this can be done cleaner, please comment / push a pr!
Anyways, should work now @MarcosIgnacioo
THANK UUUU LOV U BESTIEEEEEE ALSO SO DAM GOOD CONFIGMANNNNNN
Hi, just curious, what is intelephense able to help me with after these autocmds were added? I don't see any completion suggestions or anything else from intelepehnse in blade files, so what should I see? Maybe there's some conflict with my config, but I can't find it if I don't know what exactly doesn't work.
@gmnz could be that things have changed again, this command enables intelephense to be used in blade files but still using the blade language mode.
Unfortunately I am not able to speedily debug, so you will have to be patient or try yourself.
I've tried a few things but nothing worked so I guess I'll just be patient. :-)