diff options
| author | William Boman <william@redwill.se> | 2022-01-03 15:12:53 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-03 15:12:53 +0100 |
| commit | e8530f4059279a0d6b5e5f8891d04ffb1ade29a3 (patch) | |
| tree | b90ddf4479314af49e1eca3325262ef45e5f630d /lua/nvim-lsp-installer/servers/csharp_ls/init.lua | |
| parent | health: add neovim version check (diff) | |
| download | mason-e8530f4059279a0d6b5e5f8891d04ffb1ade29a3.tar mason-e8530f4059279a0d6b5e5f8891d04ffb1ade29a3.tar.gz mason-e8530f4059279a0d6b5e5f8891d04ffb1ade29a3.tar.bz2 mason-e8530f4059279a0d6b5e5f8891d04ffb1ade29a3.tar.lz mason-e8530f4059279a0d6b5e5f8891d04ffb1ade29a3.tar.xz mason-e8530f4059279a0d6b5e5f8891d04ffb1ade29a3.tar.zst mason-e8530f4059279a0d6b5e5f8891d04ffb1ade29a3.zip | |
write install receipts (#379)
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 |
