aboutsummaryrefslogtreecommitdiffstats
path: root/lua/mason-core/managers
diff options
context:
space:
mode:
Diffstat (limited to 'lua/mason-core/managers')
-rw-r--r--lua/mason-core/managers/luarocks/init.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/lua/mason-core/managers/luarocks/init.lua b/lua/mason-core/managers/luarocks/init.lua
index 0deb2e1f..9fd59ca1 100644
--- a/lua/mason-core/managers/luarocks/init.lua
+++ b/lua/mason-core/managers/luarocks/init.lua
@@ -21,7 +21,7 @@ local function with_receipt(package)
end
---@param package string: The luarock package to install.
----@param opts { dev: boolean, bin : string[] | nil } | nil
+---@param opts { dev: boolean?, server: string?, bin : string[]? | nil }?
function M.package(package, opts)
return function()
return M.install(package, opts).with_receipt()
@@ -30,7 +30,7 @@ end
---@async
---@param pkg string: The luarock package to install.
----@param opts { dev: boolean, bin : string[] | nil } | nil
+---@param opts { dev: boolean?, server: string?, bin : string[]? | nil }?
function M.install(pkg, opts)
opts = opts or {}
local ctx = installer.context()
@@ -40,6 +40,7 @@ function M.install(pkg, opts)
"--tree",
ctx.cwd:get(),
opts.dev and "--dev" or vim.NIL,
+ opts.server and ("--server=%s"):format(opts.server) or vim.NIL,
pkg,
ctx.requested_version:or_else(vim.NIL),
}