aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/servers/nickel_ls/init.lua
blob: 7e399949f71d3e212d67e5b4f7c6843df46696c8 (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
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" },
        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