diff options
| author | William Boman <william@redwill.se> | 2021-07-10 16:02:44 +0200 |
|---|---|---|
| committer | William Boman <william@redwill.se> | 2021-07-10 16:02:44 +0200 |
| commit | 156478b14cf4ce19262253b044aca27f5f448bc5 (patch) | |
| tree | 43d25f4776f3036e0bf686572bb0e53c06a6e896 /lua/nvim-lsp-installer/servers/elmls/init.lua | |
| parent | clangd, rust_analyzer: simplify install script a bit (diff) | |
| download | mason-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.lua | 15 |
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", }, } |
