aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/servers/puppet/init.lua
blob: 09842f30150ee9cc293a48554de77c70aed99def (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
28
29
local server = require "nvim-lsp-installer.server"
local context = require "nvim-lsp-installer.installers.context"
local std = require "nvim-lsp-installer.installers.std"
local process = require "nvim-lsp-installer.process"

return function(name, root_dir)
    return server.Server:new {
        name = name,
        root_dir = root_dir,
        homepage = "https://github.com/puppetlabs/puppet-editor-services",
        languages = { "puppet" },
        installer = {
            context.use_github_release_file("puppetlabs/puppet-editor-services", function(version)
                return ("puppet_editor_services_%s.zip"):format(version)
            end),
            context.capture(function(ctx)
                return std.unzip_remote(ctx.github_release_file)
            end),
            context.receipt(function(receipt, ctx)
                receipt:with_primary_source(receipt.github_release_file(ctx))
            end),
        },
        default_options = {
            cmd_env = {
                PATH = process.extend_path { root_dir },
            },
        },
    }
end