aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/servers/puppet/init.lua
blob: 9d302c2ec897c79e9cde84f6221096cfdce39b4d (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 server = require "nvim-lsp-installer.server"
local process = require "nvim-lsp-installer.process"
local github = require "nvim-lsp-installer.core.managers.github"

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" },
        async = true,
        installer = function()
            github.unzip_release_file({
                repo = "puppetlabs/puppet-editor-services",
                asset_file = function(version)
                    return ("puppet_editor_services_%s.zip"):format(version)
                end,
            }).with_receipt()
        end,
        default_options = {
            cmd_env = {
                PATH = process.extend_path { root_dir },
            },
        },
    }
end