aboutsummaryrefslogtreecommitdiffstats
path: root/lua/mason-registry/index/raku-navigator/init.lua
blob: 3c9cb3e1aa67737798d02c1ad3c174921ab1acb1 (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 Pkg = require "mason-core.package"
local git = require "mason-core.managers.git"
local path = require "mason-core.path"

return Pkg.new {
    name = "raku-navigator",
    desc = [[Raku Language Server that includes Raku critic and code navigation]],
    homepage = "https://github.com/bscan/RakuNavigator",
    languages = { Pkg.Lang.Raku },
    categories = { Pkg.Cat.LSP },
    ---@async
    ---@param ctx InstallContext
    install = function(ctx)
        git.clone({ "https://github.com/bscan/RakuNavigator" }).with_receipt()
        ctx.spawn.npm { "install" }
        ctx.spawn.npm { "run", "compile" }
        ctx:link_bin(
            "raku-navigator",
            ctx:write_node_exec_wrapper("raku-navigator", path.concat { "server", "out", "server.js" })
        )
    end,
}