aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/nvim-lsp-installer/servers/fsautocomplete/init.lua23
1 files changed, 20 insertions, 3 deletions
diff --git a/lua/nvim-lsp-installer/servers/fsautocomplete/init.lua b/lua/nvim-lsp-installer/servers/fsautocomplete/init.lua
index 303ebec8..0b8176fb 100644
--- a/lua/nvim-lsp-installer/servers/fsautocomplete/init.lua
+++ b/lua/nvim-lsp-installer/servers/fsautocomplete/init.lua
@@ -1,7 +1,7 @@
local server = require "nvim-lsp-installer.server"
local path = require "nvim-lsp-installer.path"
+local process = require "nvim-lsp-installer.process"
local std = require "nvim-lsp-installer.installers.std"
-local shell = require "nvim-lsp-installer.installers.shell"
return function(name, root_dir)
return server.Server:new {
@@ -11,9 +11,26 @@ return function(name, root_dir)
homepage = "https://github.com/fsharp/FsAutoComplete",
installer = {
std.ensure_executables {
- { "dotnet", "dotnet was not found in path." },
+ {
+ "dotnet",
+ "dotnet was not found in path. Refer to https://dotnet.microsoft.com/download for installation instructions.",
+ },
},
- shell.polyshell [[dotnet tool update --tool-path . fsautocomplete]],
+ ---@type ServerInstallerFunction
+ function(_, callback, ctx)
+ process.spawn("dotnet", {
+ args = { "tool", "update", "--tool-path", ".", "fsautocomplete" },
+ cwd = ctx.install_dir,
+ stdio_sink = ctx.stdio_sink,
+ }, function(success)
+ if not success then
+ ctx.stdio_sink.stderr "Failed to install fsautocomplete.\n"
+ callback(false)
+ else
+ callback(true)
+ end
+ end)
+ end,
},
default_options = {
cmd = {