aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorLateef Alabi-Oki <mystilleef@gmail.com>2021-08-22 03:45:38 -0400
committerGitHub <noreply@github.com>2021-08-22 09:45:38 +0200
commitb14bd0c5d75ca9da91d7675e98b89450b08f0143 (patch)
tree27ffca77fcba52bbf032c83960cd06b382fea6d4 /lua
parentreplace all usage of curl(1) with wget(1) (diff)
downloadmason-b14bd0c5d75ca9da91d7675e98b89450b08f0143.tar
mason-b14bd0c5d75ca9da91d7675e98b89450b08f0143.tar.gz
mason-b14bd0c5d75ca9da91d7675e98b89450b08f0143.tar.bz2
mason-b14bd0c5d75ca9da91d7675e98b89450b08f0143.tar.lz
mason-b14bd0c5d75ca9da91d7675e98b89450b08f0143.tar.xz
mason-b14bd0c5d75ca9da91d7675e98b89450b08f0143.tar.zst
mason-b14bd0c5d75ca9da91d7675e98b89450b08f0143.zip
export proper location of haskell language servers (#60)
`${__dirname}` was exporting the location of the `Packer` installation folder, instead of the location of the Haskell language servers and `hls` script. This change fixes the issue for me.
Diffstat (limited to 'lua')
-rw-r--r--lua/nvim-lsp-installer/servers/hls/install.mjs4
1 files changed, 3 insertions, 1 deletions
diff --git a/lua/nvim-lsp-installer/servers/hls/install.mjs b/lua/nvim-lsp-installer/servers/hls/install.mjs
index 5bd8b6cd..d711fdec 100644
--- a/lua/nvim-lsp-installer/servers/hls/install.mjs
+++ b/lua/nvim-lsp-installer/servers/hls/install.mjs
@@ -22,7 +22,9 @@ await $`rm hls.tar.gz`;
await $`chmod +x haskell*`;
const scriptContent = `#!/usr/bin/env bash
-PATH="$PATH:${__dirname}" "${__dirname}/haskell-language-server-wrapper" --lsp`;
+HLS_DIR=$(dirname "$0")
+export PATH=$PATH:$HLS_DIR
+haskell-language-server-wrapper --lsp`;
await fs.writeFile("./hls", scriptContent);
await $`chmod +x hls`