aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/servers/scry/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/nvim-lsp-installer/servers/scry/init.lua')
-rw-r--r--lua/nvim-lsp-installer/servers/scry/init.lua40
1 files changed, 14 insertions, 26 deletions
diff --git a/lua/nvim-lsp-installer/servers/scry/init.lua b/lua/nvim-lsp-installer/servers/scry/init.lua
index 8c092ad2..43a2ccd6 100644
--- a/lua/nvim-lsp-installer/servers/scry/init.lua
+++ b/lua/nvim-lsp-installer/servers/scry/init.lua
@@ -1,8 +1,8 @@
local server = require "nvim-lsp-installer.server"
-local std = require "nvim-lsp-installer.installers.std"
local process = require "nvim-lsp-installer.process"
local path = require "nvim-lsp-installer.path"
-local context = require "nvim-lsp-installer.installers.context"
+local std = require "nvim-lsp-installer.core.managers.std"
+local git = require "nvim-lsp-installer.core.managers.git"
return function(name, root_dir)
return server.Server:new {
@@ -10,30 +10,18 @@ return function(name, root_dir)
root_dir = root_dir,
languages = { "crystal" },
homepage = "https://github.com/crystal-lang-tools/scry",
- installer = {
- std.ensure_executables {
- {
- "crystal",
- "crystal was not found in path. Refer to https://crystal-lang.org/install/ for installation instructions.",
- },
- {
- "shards",
- "shards was not found in path. Refer to https://crystal-lang.org/install/ for installation instructions.",
- },
- },
- std.git_clone "https://github.com/crystal-lang-tools/scry.git",
- ---@type ServerInstallerFunction
- function(_, callback, ctx)
- process.spawn("shards", {
- args = { "build", "--verbose", "--release" },
- cwd = ctx.install_dir,
- stdio_sink = ctx.stdio_sink,
- }, callback)
- end,
- context.receipt(function(receipt)
- receipt:with_primary_source(receipt.git_remote "https://github.com/crystal-lang-tools/scry.git")
- end),
- },
+ async = true,
+ ---@param ctx InstallContext
+ installer = function(ctx)
+ std.ensure_executable("crystal", {
+ help_url = "https://crystal-lang.org/install/",
+ })
+ std.ensure_executable("shards", {
+ help_url = "https://crystal-lang.org/install/",
+ })
+ git.clone({ "https://github.com/crystal-lang-tools/scry.git" }).with_receipt()
+ ctx.spawn.shards { "build", "--verbose", "--release" }
+ end,
default_options = {
cmd_env = {
PATH = process.extend_path { path.concat { root_dir, "bin" } },