aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/mason/api/command.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/lua/mason/api/command.lua b/lua/mason/api/command.lua
index 75c101a4..0c2e3e9b 100644
--- a/lua/mason/api/command.lua
+++ b/lua/mason/api/command.lua
@@ -92,6 +92,7 @@ local function MasonInstall(package_specifiers, opts)
version = version,
debug = opts.debug,
force = opts.force,
+ strict = opts.strict,
target = opts.target,
}
end)
@@ -149,7 +150,14 @@ end, {
complete = function(arg_lead)
local registry = require "mason-registry"
- if _.matches("^.+@", arg_lead) then
+ if _.starts_with("--", arg_lead) then
+ return _.filter(_.starts_with(arg_lead), {
+ "--debug",
+ "--force",
+ "--strict",
+ "--target=",
+ })
+ elseif _.matches("^.+@", arg_lead) then
local pkg_name, version = unpack(_.match("^(.+)@(.*)", arg_lead))
local ok, pkg = pcall(registry.get_package, pkg_name)
if not ok then