aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/nvim-lsp-installer/servers/omnisharp/init.lua30
1 files changed, 19 insertions, 11 deletions
diff --git a/lua/nvim-lsp-installer/servers/omnisharp/init.lua b/lua/nvim-lsp-installer/servers/omnisharp/init.lua
index 2acacb00..19960003 100644
--- a/lua/nvim-lsp-installer/servers/omnisharp/init.lua
+++ b/lua/nvim-lsp-installer/servers/omnisharp/init.lua
@@ -14,22 +14,34 @@ return function(name, root_dir)
homepage = "https://github.com/OmniSharp/omnisharp-roslyn",
languages = { "c#" },
installer = {
+ std.ensure_executables {
+ {
+ "dotnet",
+ "dotnet was not found in path. Refer to https://dotnet.microsoft.com/download for installation instructions.",
+ },
+ },
context.use_github_release_file(
"OmniSharp/omnisharp-roslyn",
coalesce(
- when(platform.is_mac, "omnisharp-osx.zip"),
+ when(
+ platform.is_mac,
+ coalesce(
+ when(platform.arch == "x64", "omnisharp-osx-x64-net6.0.zip"),
+ when(platform.arch == "arm64", "omnisharp-osx-arm64-net6.0.zip")
+ )
+ ),
when(
platform.is_linux,
coalesce(
- when(platform.arch == "x64", "omnisharp-linux-x64.zip"),
- when(platform.arch == "arm64", "omnisharp-linux-arm64.zip")
+ when(platform.arch == "x64", "omnisharp-linux-x64-net6.0.zip"),
+ when(platform.arch == "arm64", "omnisharp-linux-arm64-net6.0.zip")
)
),
when(
platform.is_win,
coalesce(
- when(platform.arch == "x64", "omnisharp-win-x64.zip"),
- when(platform.arch == "arm64", "omnisharp-win-arm64.zip")
+ when(platform.arch == "x64", "omnisharp-win-x64-net6.0.zip"),
+ when(platform.arch == "arm64", "omnisharp-win-arm64-net6.0.zip")
)
)
)
@@ -37,18 +49,14 @@ return function(name, root_dir)
context.capture(function(ctx)
return std.unzip_remote(ctx.github_release_file, "omnisharp")
end),
- std.chmod("+x", { "omnisharp/run" }),
context.receipt(function(receipt, ctx)
receipt:with_primary_source(receipt.github_release_file(ctx))
end),
},
default_options = {
cmd = {
- platform.is_win and path.concat { root_dir, "omnisharp", "OmniSharp.exe" } or path.concat {
- root_dir,
- "omnisharp",
- "run",
- },
+ "dotnet",
+ path.concat { root_dir, "omnisharp", "OmniSharp.dll" },
"--languageserver",
"--hostPID",
tostring(vim.fn.getpid()),