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

return function(name, root_dir)
    return server.Server:new {
        name = name,
        root_dir = root_dir,
        languages = { "rescript" },
        homepage = "https://github.com/rescript-lang/rescript-vscode",
        async = true,
        installer = function()
            github.unzip_release_file({
                repo = "rescript-lang/rescript-vscode",
                asset_file = function(version)
                    return ("rescript-vscode-%s.vsix"):format(version)
                end,
            }).with_receipt()
        end,
        default_options = {
            cmd = { "node", path.concat { root_dir, "extension", "server", "out", "server.js" }, "--stdio" },
        },
    }
end