aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/servers/hls/install.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'lua/nvim-lsp-installer/servers/hls/install.mjs')
-rw-r--r--lua/nvim-lsp-installer/servers/hls/install.mjs21
1 files changed, 21 insertions, 0 deletions
diff --git a/lua/nvim-lsp-installer/servers/hls/install.mjs b/lua/nvim-lsp-installer/servers/hls/install.mjs
new file mode 100644
index 00000000..be239614
--- /dev/null
+++ b/lua/nvim-lsp-installer/servers/hls/install.mjs
@@ -0,0 +1,21 @@
+const VERSION = "1.2.0";
+
+const target = (() => {
+ const platform = os.platform();
+ switch (platform) {
+ case "win32": {
+ console.error(chalk.red(`${platform} is not yet supported.`));
+ process.exit(1);
+ }
+ case "darwin":
+ return `haskell-language-server-wrapper-macOS.gz`;
+ default:
+ return `haskell-language-server-wrapper-Linux.gz`;
+ }
+})();
+
+const downloadUrl = `https://github.com/haskell/haskell-language-server/releases/download/${VERSION}/${target}`;
+
+await $`wget -O hls.gz ${downloadUrl}`;
+await $`gunzip hls.gz`;
+await $`chmod +x hls`