From 1e3c60c46ab32416df56e7c19b4475afd5abe186 Mon Sep 17 00:00:00 2001 From: William Boman Date: Fri, 22 Jul 2022 18:26:23 +0200 Subject: feat: add luaformatter (#116) Co-authored-by: Ali Shahid --- lua/mason-core/managers/luarocks/init.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lua/mason-core/managers') 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), } -- cgit v1.2.3-70-g09d2