aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer
diff options
context:
space:
mode:
authorIbrahim Abdelkareem <ibrahim.abdelkareem.1990@gmail.com>2022-02-11 12:34:12 +0100
committerGitHub <noreply@github.com>2022-02-11 12:34:12 +0100
commitcd9a9b0e4df6e011045c8470eebea0994173578b (patch)
tree3c239448a55f24117ac475f855d3d3f6fc4f113f /lua/nvim-lsp-installer
parentfix(ccls/macos): append /lib/cmake to CMAKE_PREFIX_PATH (#471) (diff)
downloadmason-cd9a9b0e4df6e011045c8470eebea0994173578b.tar
mason-cd9a9b0e4df6e011045c8470eebea0994173578b.tar.gz
mason-cd9a9b0e4df6e011045c8470eebea0994173578b.tar.bz2
mason-cd9a9b0e4df6e011045c8470eebea0994173578b.tar.lz
mason-cd9a9b0e4df6e011045c8470eebea0994173578b.tar.xz
mason-cd9a9b0e4df6e011045c8470eebea0994173578b.tar.zst
mason-cd9a9b0e4df6e011045c8470eebea0994173578b.zip
add omnisharp net6.0 support instead of mono (#472)
This is a breaking change for existing installations of Omnisharp - reinstallation will be required after updating plugin version.
Diffstat (limited to 'lua/nvim-lsp-installer')
-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()),