aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/servers/elmls/init.lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2021-07-10 16:02:44 +0200
committerWilliam Boman <william@redwill.se>2021-07-10 16:02:44 +0200
commit156478b14cf4ce19262253b044aca27f5f448bc5 (patch)
tree43d25f4776f3036e0bf686572bb0e53c06a6e896 /lua/nvim-lsp-installer/servers/elmls/init.lua
parentclangd, rust_analyzer: simplify install script a bit (diff)
downloadmason-156478b14cf4ce19262253b044aca27f5f448bc5.tar
mason-156478b14cf4ce19262253b044aca27f5f448bc5.tar.gz
mason-156478b14cf4ce19262253b044aca27f5f448bc5.tar.bz2
mason-156478b14cf4ce19262253b044aca27f5f448bc5.tar.lz
mason-156478b14cf4ce19262253b044aca27f5f448bc5.tar.xz
mason-156478b14cf4ce19262253b044aca27f5f448bc5.tar.zst
mason-156478b14cf4ce19262253b044aca27f5f448bc5.zip
npm, pip3: add executable(root_dir, executable) util function
Diffstat (limited to 'lua/nvim-lsp-installer/servers/elmls/init.lua')
-rw-r--r--lua/nvim-lsp-installer/servers/elmls/init.lua15
1 files changed, 4 insertions, 11 deletions
diff --git a/lua/nvim-lsp-installer/servers/elmls/init.lua b/lua/nvim-lsp-installer/servers/elmls/init.lua
index 6cd47c22..a175cd8f 100644
--- a/lua/nvim-lsp-installer/servers/elmls/init.lua
+++ b/lua/nvim-lsp-installer/servers/elmls/init.lua
@@ -1,25 +1,18 @@
local server = require("nvim-lsp-installer.server")
-local path = require("nvim-lsp-installer.path")
local npm = require("nvim-lsp-installer.installers.npm")
local root_dir = server.get_server_root_path("elm")
-local bin_dir = path.concat { root_dir, "node_modules", ".bin" }
-
-local function bin(executable)
- return path.concat { bin_dir, executable }
-end
-
return server.Server:new {
name = "elmls",
root_dir = root_dir,
installer = npm.packages { "elm", "elm-test", "elm-format", "@elm-tooling/elm-language-server" },
default_options = {
- cmd = { bin("elm-language-server") },
+ cmd = { npm.executable(root_dir, "elm-language-server") },
init_options = {
- elmPath = bin("elm"),
- elmFormatPath = bin("elm-format"),
- elmTestPath = bin("elm-test"),
+ elmPath = npm.executable(root_dir, "elm"),
+ elmFormatPath = npm.exe(root_dir, "elm-format"),
+ elmTestPath = npm.exe(root_dir, "elm-test"),
elmAnalyseTrigger = "change",
},
}