VonHeikemen / lsp-zero.nvim

A starting point to setup some lsp related features in neovim.
https://lsp-zero.netlify.app/docs/
MIT License
3.88k stars 98 forks source link

Spawning language server fails #12

Closed Amparose closed 2 years ago

Amparose commented 2 years ago

I have just installed with vim-plug, using "recommended" on Neviom 0.7. After being asked if I want to install a vim LSP when opening my config, I selected yes. When I relaunch and open a vim file I get a console message:

Spawning language server with cmd: `vim-language-server` failed. The language server is either not installed, missing from PATH, or not executable.

Isn't this plugin meant to manage all of this? Not sure how to fix this.

VonHeikemen commented 2 years ago

That was fun... it's a very weird bug. Good news is I think I found the cause... bad news is probably need to reinstall vimls.

So, after you get the error message uninstall vimls with this.

:LspUninstall --sync vimls

Update lsp-zero to download the recent commit (7f0d541) and restart neovim. Install vimls:

:LspInstall --sync vimls

Hopefully this will download vimls with the "right state". At this point you can either start the server manually with:

:LspZeroSetupServers vimls

Or restart neovim.

Amparose commented 2 years ago

Just tried it @VonHeikemen and looks like that fixes the issue. Awesome work and thank you for the fix!