fix make lua to accept multiple targets

This commit is contained in:
2025-10-30 02:00:10 -03:00
parent 33b2570b4e
commit 92b3bd1af3

View File

@@ -3,13 +3,14 @@ local M = {}
local float_term = require("util.float").float_terminal
vim.api.nvim_create_user_command("Make", function(opts)
local t = opts.args
if t == "" then print("Usage: :Make <target>"); return end
if opts.args == "" then
print("Usage: :Make <targets>")
return
end
local args = vim.split(opts.args, "%s+")
float_term(
{ "make", t},
vim.list_extend({ "make" }, args),
{ height_ratio = 0.8, width_ratio = 0.8, border = "single" }
)
end, { nargs = 1 })
return M
end, { nargs = "*" })