aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/servers/rome/init.lua
blob: ca1f25bfcdc59a3300549fa6e35894db1e6fdeb5 (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 npm = require "nvim-lsp-installer.installers.npm"
local Data = require "nvim-lsp-installer.data"
local context = require "nvim-lsp-installer.installers.context"

return function(name, root_dir)
    return server.Server:new {
        name = name,
        root_dir = root_dir,
        languages = { "typescript", "javascript" },
        homepage = "https://rome.tools",
        installer = {
            context.set(function(ctx)
                ctx.requested_server_version = Data.coalesce(
                    ctx.requested_server_version,
                    "10.0.7-nightly.2021.7.27" -- https://github.com/rome/tools/pull/1409
                )
            end),
            npm.packages { "rome" },
        },
        default_options = {
            cmd_env = npm.env(root_dir),
        },
    }
end