aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/servers/phpactor/init.lua
blob: 164436e4a3065b8be0d4f86945847137f802b19e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
local installers = require "nvim-lsp-installer.installers"
local path = require "nvim-lsp-installer.path"
local server = require "nvim-lsp-installer.server"
local composer = require "nvim-lsp-installer.installers.composer"
local std = require "nvim-lsp-installer.installers.std"

return function(name, root_dir)
    return server.Server:new {
        name = name,
        root_dir = root_dir,
        homepage = "https://phpactor.readthedocs.io/en/master/",
        installer = installers.when {
            unix = {
                std.git_clone "https://github.com/phpactor/phpactor.git",
                composer.install(),
            },
        },
        default_options = {
            cmd = { path.concat { root_dir, "bin", "phpactor" }, "language-server" },
        },
    }
end