OmniSharp / omnisharp-vim

Vim omnicompletion (intellisense) and more for C#
http://www.omnisharp.net
MIT License
1.72k stars 168 forks source link

Cannot install OmniSharp server in neovim `E684: list index out of range: -1` #752

Closed ibrahimbayyinah closed 2 years ago

ibrahimbayyinah commented 2 years ago

I'm trying to install this plugin in neovim by using vim-plug. The plugin omnisharp-vim installed correctly. Whenever I try to open a .cs file however, it asks me to install the OmniSharp server. I type Y and after a few seconds, it presents me with the file. I get no error message, but it seems like the OmniSharp server hasn't been installed, as I cannot use any of the mappings. On top of that, when I want to edit a new file with :edit, it tells me that the OmnSharp server isn't installed and asks me again to install it. When I press Y this time, I do get an error:

E684: list index out of range: -1

It also keeps asking me to install the server when I close all files and try to open a .cs file again.

Furthermore, when I try to install the server with :OmniSharpInstall, I get the following error message:

Failed to install the OmniSharp-Roslyn server
Error detected while processing function OmniSharp#Install:
line 53:
E684: list index out of range: -1

I have had this problem on 3 devices:

Neovim version: 0.6.1 Plugin manager: vim-plug OS: Linux 64-bit (x64) and Linux 32-bit ARM (Raspbian)

nickspoons commented 2 years ago

I'll have a look later on and see if I have any problems with the installer from neovim.

In the meantime, some things you could try are:

  1. Install the server from vim instead of neovim. Once it's installed (which just means downloaded from a GitHub release and extracted) it will be usable from neovim.
  2. Use the install script directly, see https://github.com/OmniSharp/omnisharp-vim/tree/master/installer
nickspoons commented 2 years ago

The installer is working correctly for me in archlinux with nvim 0.6.1.

I've just pushed commit 70810cf which should avoid the E684: list index out of range: -1 error you're seeing, but I don't understand how that situation is arising in the first place. Your neovim is running let l:error_msgs = systemlist(l:command) where l:command is the installer script, the system call is failing somehow, and l:error_msgs is being populated with an empty list. That's a bit peculiar, I would at least have expected an error message to be returned.

I suspect there is some kind of permissions issue here.

nickspoons commented 2 years ago

Closing, as unable to reproduce, and no feedback from OP