aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/servers/nickel_ls/init.lua
blob: 01bf10040fed0ea0b1e529628ae80c1ad20c0353 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
local path = require "nvim-lsp-installer.path"
local server = require "nvim-lsp-installer.server"
local cargo = require "nvim-lsp-installer.core.managers.cargo"
local git = require "nvim-lsp-installer.core.managers.git"

return function(name, root_dir)
    return server.Server:new {
        name = name,
        root_dir = root_dir,
        homepage = "https://nickel-lang.org/",
        languages = { "nickel" },
        async = true,
        installer = function(ctx)
            git.clone({ "https://github.com/tweag/nickel" }).with_receipt()
            ctx.spawn.cargo {
                "install",
                "--root",
                ".",
                "--path",
                path.concat { "lsp", "nls" },
            }
        end,
        default_options = {
            cmd_env = cargo.env(root_dir),
        },
    }
end