Open kolpav opened 3 years ago
Fix I am using
local function setup_servers()
require'lspinstall'.setup()
local servers = require'lspinstall'.installed_servers()
for _, server in pairs(servers) do
local config = make_config()
if server == "csharp" then
server = 'omnisharp'
local pid = vim.fn.getpid()
local omnisharp_bin = '/Users/kolpav/.local/share/nvim/lspinstall/csharp/run'
config.cmd = { omnisharp_bin, "--languageserver" , "--hostPID", tostring(pid) }
end
require'lspconfig'[server].setup(config)
end
end
Hello i am the creator of the csharp server for this plugin. what is exactly your issue? It runs for me perfectly other than the startup being a bit slow. Even in the project template you used it works fine with some namespaces seem to be "missing"
@MordechaiHadad Well I'll try to give it another look sometime. I was following everything very carefully on fresh ubuntu running in docker and I got exactly the same problem as on my local. I'll try to share the docker image next time. Thank you for reaching out
@MordechaiHadad I have tried again on clean ubuntu install and it seems to be not very usable at the moment. It reports namespace as missing after syntax error and keeps reporting them even after you fix the error. Go to definition/implementation doesn't work across files.
root@534e8d105493:/NvimLsp# uname -a
Linux 534e8d105493 5.10.25-linuxkit #1 SMP Tue Mar 23 09:27:39 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
root@534e8d105493:/NvimLsp# dotnet --version
5.0.301
root@534e8d105493:/NvimLsp# nvim --version
NVIM v0.5.0-dev
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -g -O2 -fdebug-prefix-map=/build/neovim-wS4eSl/neovim-0.5.0+ubuntu2+git202107021758-7685fc9ec-d569569c9=. -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/build/neovim-wS4eSl/neovim-0.5.0+ubuntu2+git202107021758-7685fc9ec-d569569c9/build/config -I/build/neovim-wS4eSl/neovim-0.5.0+ubuntu2+git202107021758-7685fc9ec-d569569c9/src -I/build/neovim-wS4eSl/neovim-0.5.0+ubuntu2+git202107021758-7685fc9ec-d569569c9/.deps/usr/include -I/usr/include -I/build/neovim-wS4eSl/neovim-0.5.0+ubuntu2+git202107021758-7685fc9ec-d569569c9/build/src/nvim/auto -I/build/neovim-wS4eSl/neovim-0.5.0+ubuntu2+git202107021758-7685fc9ec-d569569c9/build/include
Compiled by buildd@lcy01-amd64-011
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim"
Run :checkhealth for more info
root@534e8d105493:/NvimLsp# dotnet build
Microsoft (R) Build Engine version 16.10.1+2fd48ab73 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.
Determining projects to restore...
All projects are up-to-date for restore.
NvimLsp -> /NvimLsp/bin/Debug/net5.0/NvimLsp.dll
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:02.2
https://github.com/kabouzeid/nvim-lspinstall/issues/75
I think I pinpointed problem I am having with
:LspInstall csharp
I don't know anything about lua but if I am understanding the code correctly I think you should renamecsharp
toomnisharp
because language name you are using inlspinstall
is then used as a key to select language inlspconfig
but there is nocsharp
inlspconfing
. I am not 100% sure but based on code below wheresetup_servers()
is not working butsetup_servers2()
does it seems that way. Please note I am using omnisharp fromlspinstall
in mysetup_servers2()
fnI tested everything on clean ubuntu inside docker.