Closed jedielson closed 3 years ago
I'm not sure, I haven't seen that before.
:OmniSharpInstall
to get the latest)<Framework target>
in the .csproj?The error is being raised by the server so there's only limited help we can give in this repo, but we can try to narrow the problem down at least.
It's akward...
I do have omnishap roslyn installed, and I configure it like this...
local nvim_lsp = require('lspconfig')
local on_attach = function(client, bufferNumber)
require('completion').on_attach(client)
end
local omnisharp_root = ""
if vim.fn.has('unix') == 1 then
print('Hello from linux\n')
omnisharp_root = "/home/jedi/.cache/omnisharp-vim/omnisharp-roslyn/run"
else
print("Hello from Windows\n")
omnisharp_root = "C:\\ProgramData\\chocolatey\\bin\\OmniSharp.exe"
end
local pid = vim.fn.getpid()
local omnisharp_bin = nvim_lsp.omnisharp.setup({ cmd = { omnisharp_root, "--languageserver" , "--hostPID", tostring(pid) } })
That is configuring neovim LSP, not OmniSharp-vim. As you can see from the 2nd line of your log, OmniSharp-vim is not using that config you've shown, the server (OmniSharp.exe
) is at the OmniSharp-vim install location C:\Users\myuser\AppData\Local\omnisharp-vim\omnisharp-roslyn\OmniSharp.exe
, not your chocolatey install path. If you are going to use both OmniSharp-vim and LSP, you'll be running 2 instances of the server simultaneously. On Windows it looks like you'll be using the chocolatey version from neovim LSP, whatever version that might be.
To help diagnose the original problem, please upgrade the server used by OmniSharp-vim with :OmniSharpInstall
, and then answer question 2 from my previous comment.
Closing due to lack of response
HI.
Here is my log.
The root where the project is has a .sln file, so what can be causing this error?