aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/servers/elmls/init.lua
blob: aa776a88af6011cd43ff761bd18fc6398067353f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
local server = require "nvim-lsp-installer.server"
local npm = require "nvim-lsp-installer.installers.npm"

return function(name, root_dir)
    return server.Server:new {
        name = name,
        root_dir = root_dir,
        installer = npm.packages { "elm", "elm-test", "elm-format", "@elm-tooling/elm-language-server" },
        default_options = {
            cmd = { npm.executable(root_dir, "elm-language-server") },
            init_options = {
                elmPath = npm.executable(root_dir, "elm"),
                elmFormatPath = npm.executable(root_dir, "elm-format"),
                elmTestPath = npm.executable(root_dir, "elm-test"),
                elmAnalyseTrigger = "change",
            },
        },
    }
end