neovim / nvim-lspconfig

Quickstart configs for Nvim LSP
Apache License 2.0
10.47k stars 2.06k forks source link

Auto-detected install path incorrect for LSP servers #289

Closed 0xRainy closed 3 years ago

0xRainy commented 4 years ago

Getting this error with :LspInstallInfo vimls and same for jsonls

 {
  bin_dir = "C:\\Users\\rainy\\AppData\\Local\\Temp\\nvim\\nvim_lsp\\vimls\\node_modules\\.bin",
  binaries = {
    ["vim-language-server"] = "C:\\Users\\rainy\\AppData\\Local\\Temp\\nvim\\nvim_lsp\\vimls\\node_modules\\.bin\\vim-language-server"
  },
  install_dir = "C:\\Users\\rainy\\AppData\\Local\\Temp\\nvim\\nvim_lsp\\vimls",
  is_installed = false
} 

I used npm --global to install vim-language-server and it is installed to C:\Users\rainy\AppData\Roaming\npm

When calling :LspInstall vimls it says it is already installed, same for jsonls.

Also have similar issue with the other LSPs I have installed, rust/pyls Calling :PlugInstallInfo rls returns

E5108: Error executing lua ...\.config\nvim\autoload\plugged\nvim-lsp\lua\nvim_lsp.lua:63: attempt to call field 'install_info' (a nil value)

but rls.exe available through my PATH, same result for pyls

Upon opening a .vim file I also get this error:

Error detected while processing FileType Autocommands for "vim":
E5108: Error executing lua C:\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:268: attempt to index upvalue 'handle' (a nil value)

*edit - Have working config on linux, same config doesn't work on windows, getting above error still when opening .vim files

How to reproduce the problem from neovim startup

Launch neovim on Windows :LspInstallInfo vimls

Actual behaviour

is_installed = false LSP doesn't work

Expected behaviour

is_installed = true and the LSP works

Notes

Also discovered that this plugin breaks some lua functions for vim-clap, specifically searching a file for text with the grep function.

mjlbach commented 3 years ago

Closed by #498