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.lua42
1 files changed, 21 insertions, 21 deletions
diff --git a/lua/nvim-lsp-installer/servers/hls/init.lua b/lua/nvim-lsp-installer/servers/hls/init.lua
index 88b48e99..00ac6d50 100644
--- a/lua/nvim-lsp-installer/servers/hls/init.lua
+++ b/lua/nvim-lsp-installer/servers/hls/init.lua
@@ -1,37 +1,37 @@
local server = require "nvim-lsp-installer.server"
local platform = require "nvim-lsp-installer.platform"
-local installers = require "nvim-lsp-installer.installers"
local path = require "nvim-lsp-installer.path"
+local installers = require "nvim-lsp-installer.installers"
local std = require "nvim-lsp-installer.installers.std"
local shell = require "nvim-lsp-installer.installers.shell"
local Data = require "nvim-lsp-installer.data"
-local root_dir = server.get_server_root_path "haskell"
-
local VERSION = "1.3.0"
local target = Data.coalesce(
Data.when(platform.is_mac, "haskell-language-server-macOS-%s.tar.gz"),
- Data.when(platform.is_unix, "haskell-language-server-Linux-%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 server.Server:new {
- name = "hls",
- root_dir = root_dir,
- installer = {
- std.untargz_remote(
- ("https://github.com/haskell/haskell-language-server/releases/download/%s/%s"):format(VERSION, target)
- ),
- installers.on {
- -- we can't use std.chmod because of shell wildcard expansion
- unix = shell.bash [[ chmod +x haskell*]],
+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)
+ ),
+ installers.on {
+ -- we can't use std.chmod because of shell wildcard expansion
+ unix = shell.bash [[ chmod +x haskell*]],
+ },
},
- },
- default_options = {
- cmd = { path.concat { root_dir, "haskell-language-server-wrapper", "--lsp" } },
- cmd_env = {
- PATH = table.concat({ root_dir, vim.env.PATH }, platform.path_sep),
+ default_options = {
+ cmd = { path.concat { root_dir, "haskell-language-server-wrapper", "--lsp" } },
+ cmd_env = {
+ PATH = table.concat({ root_dir, vim.env.PATH }, platform.path_sep),
+ },
},
- },
-}
+ }
+end