aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/servers/bicep/init.lua
blob: 7967215034bf201aa4ff45dc13bce9127cfa714c (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
local server = require "nvim-lsp-installer.server"
local path = require "nvim-lsp-installer.path"
local std = require "nvim-lsp-installer.installers.std"
local context = require "nvim-lsp-installer.installers.context"

return function(name, root_dir)
    return server.Server:new {
        name = name,
        root_dir = root_dir,
        languages = { "bicep" },
        homepage = "https://github.com/Azure/bicep",
        installer = {
            std.ensure_executables {
                { "dotnet", "dotnet is required to run the bicep language server." },
            },
            context.use_github_release_file("Azure/bicep", "bicep-langserver.zip"),
            context.capture(function(ctx)
                return std.unzip_remote(ctx.github_release_file)
            end),
        },
        default_options = {
            cmd = { "dotnet", path.concat { root_dir, "Bicep.LangServer.dll" } },
        },
    }
end