diff options
Diffstat (limited to 'lua/nvim-lsp-installer/servers/csharp_ls/init.lua')
| -rw-r--r-- | lua/nvim-lsp-installer/servers/csharp_ls/init.lua | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/lua/nvim-lsp-installer/servers/csharp_ls/init.lua b/lua/nvim-lsp-installer/servers/csharp_ls/init.lua index b77030cf..82ad4258 100644 --- a/lua/nvim-lsp-installer/servers/csharp_ls/init.lua +++ b/lua/nvim-lsp-installer/servers/csharp_ls/init.lua @@ -1,6 +1,5 @@ local server = require "nvim-lsp-installer.server" -local process = require "nvim-lsp-installer.process" -local std = require "nvim-lsp-installer.installers.std" +local dotnet = require "nvim-lsp-installer.installers.dotnet" return function(name, root_dir) return server.Server:new { @@ -8,33 +7,9 @@ return function(name, root_dir) root_dir = root_dir, languages = { "c#" }, homepage = "https://github.com/razzmatazz/csharp-language-server", - installer = { - std.ensure_executables { - { - "dotnet", - "dotnet was not found in path. Refer to https://dotnet.microsoft.com/download for installation instructions.", - }, - }, - ---@type ServerInstallerFunction - function(_, callback, ctx) - process.spawn("dotnet", { - args = { "tool", "update", "--tool-path", ".", "csharp-ls" }, - cwd = ctx.install_dir, - stdio_sink = ctx.stdio_sink, - }, function(success) - if not success then - ctx.stdio_sink.stderr "Failed to install csharp-ls.\n" - callback(false) - else - callback(true) - end - end) - end, - }, + installer = dotnet.package "csharp-ls", default_options = { - cmd_env = { - PATH = process.extend_path { root_dir }, - }, + cmd_env = dotnet.env(root_dir), }, } end |
