aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/servers/slint_lsp/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/nvim-lsp-installer/servers/slint_lsp/init.lua')
-rw-r--r--lua/nvim-lsp-installer/servers/slint_lsp/init.lua38
1 files changed, 19 insertions, 19 deletions
diff --git a/lua/nvim-lsp-installer/servers/slint_lsp/init.lua b/lua/nvim-lsp-installer/servers/slint_lsp/init.lua
index 2cdfbd63..877adf12 100644
--- a/lua/nvim-lsp-installer/servers/slint_lsp/init.lua
+++ b/lua/nvim-lsp-installer/servers/slint_lsp/init.lua
@@ -1,33 +1,33 @@
local server = require "nvim-lsp-installer.server"
-local Data = require "nvim-lsp-installer.data"
-local std = require "nvim-lsp-installer.installers.std"
local path = require "nvim-lsp-installer.path"
local platform = require "nvim-lsp-installer.platform"
local process = require "nvim-lsp-installer.process"
-local context = require "nvim-lsp-installer.installers.context"
-
-local coalesce, when = Data.coalesce, Data.when
+local github = require "nvim-lsp-installer.core.managers.github"
return function(name, root_dir)
- local archive_name = coalesce(
- when(platform.is_linux and platform.arch == "x64", "slint-lsp-linux.tar.gz"),
- when(platform.is_win and platform.arch == "x64", "slint-lsp-windows.zip")
- )
return server.Server:new {
name = name,
root_dir = root_dir,
homepage = "https://slint-ui.com/",
languages = { "slint" },
- installer = {
- context.use_github_release_file("slint-ui/slint", archive_name),
- context.capture(function(ctx)
- if platform.is_win then
- return std.unzip_remote(ctx.github_release_file)
- else
- return std.untargz_remote(ctx.github_release_file)
- end
- end),
- },
+ async = true,
+ installer = function()
+ local repo = "slint-ui/slint"
+ platform.when {
+ win = function()
+ github.unzip_release_file({
+ repo = repo,
+ asset_file = "slint-lsp-windows.zip",
+ }).with_receipt()
+ end,
+ linux = function()
+ github.untargz_release_file({
+ repo = repo,
+ asset_file = "slint-lsp-linux.tar.gz",
+ }).with_receipt()
+ end,
+ }
+ end,
default_options = {
cmd_env = {
PATH = process.extend_path { path.concat { root_dir, "slint-lsp" } },