aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/servers/hls/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/nvim-lsp-installer/servers/hls/init.lua')
-rw-r--r--lua/nvim-lsp-installer/servers/hls/init.lua22
1 files changed, 11 insertions, 11 deletions
diff --git a/lua/nvim-lsp-installer/servers/hls/init.lua b/lua/nvim-lsp-installer/servers/hls/init.lua
index d030c673..940deb1a 100644
--- a/lua/nvim-lsp-installer/servers/hls/init.lua
+++ b/lua/nvim-lsp-installer/servers/hls/init.lua
@@ -3,25 +3,25 @@ local platform = require "nvim-lsp-installer.platform"
local path = require "nvim-lsp-installer.path"
local installers = require "nvim-lsp-installer.installers"
local std = require "nvim-lsp-installer.installers.std"
+local context = require "nvim-lsp-installer.installers.context"
local shell = require "nvim-lsp-installer.installers.shell"
local Data = require "nvim-lsp-installer.data"
-local VERSION = "1.4.0"
-
-local target = Data.coalesce(
- Data.when(platform.is_mac, "haskell-language-server-macOS-%s.tar.gz"),
- Data.when(platform.is_linux, "haskell-language-server-Linux-%s.tar.gz"),
- Data.when(platform.is_win, "haskell-language-server-Windows-%s.tar.gz")
-):format(VERSION)
-
return function(name, root_dir)
return server.Server:new {
name = name,
root_dir = root_dir,
installer = {
- std.untargz_remote(
- ("https://github.com/haskell/haskell-language-server/releases/download/%s/%s"):format(VERSION, target)
- ),
+ context.github_release_file("haskell/haskell-language-server", function(version)
+ return Data.coalesce(
+ Data.when(platform.is_mac, "haskell-language-server-macOS-%s.tar.gz"),
+ Data.when(platform.is_linux, "haskell-language-server-Linux-%s.tar.gz"),
+ Data.when(platform.is_win, "haskell-language-server-Windows-%s.tar.gz")
+ ):format(version)
+ end),
+ context.capture(function(ctx)
+ return std.untargz_remote(ctx.github_release_file)
+ end),
installers.on {
-- we can't use std.chmod because of shell wildcard expansion
unix = shell.bash [[ chmod +x haskell*]],