mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-06-27 19:24:13 +00:00
feat: added support for plugin packages by lazy, rockspec and packspec
This commit is contained in:
parent
f1ba2e3d05
commit
3be55a4615
11 changed files with 281 additions and 171 deletions
|
@ -241,22 +241,21 @@ function M._dump(value, result)
|
|||
table.insert(result, value._raw)
|
||||
elseif t == "table" then
|
||||
table.insert(result, "{")
|
||||
local i = 1
|
||||
for _, v in ipairs(value) do
|
||||
M._dump(v, result)
|
||||
table.insert(result, ",")
|
||||
end
|
||||
---@diagnostic disable-next-line: no-unknown
|
||||
for k, v in pairs(value) do
|
||||
if k == i then
|
||||
elseif type(k) == "string" then
|
||||
if type(k) == "string" then
|
||||
if k:match("^[a-zA-Z]+$") then
|
||||
table.insert(result, ("%s="):format(k))
|
||||
else
|
||||
table.insert(result, ("[%q]="):format(k))
|
||||
end
|
||||
else
|
||||
table.insert(result, k .. "=")
|
||||
M._dump(v, result)
|
||||
table.insert(result, ",")
|
||||
end
|
||||
M._dump(v, result)
|
||||
table.insert(result, ",")
|
||||
i = i + 1
|
||||
end
|
||||
table.insert(result, "}")
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue