mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-19 21:06:46 +00:00
feat(util): opts merging now supports lists extending by tagging a table with __extend = true. Use with care
This commit is contained in:
parent
70f2c090d3
commit
74fd3611f2
2 changed files with 25 additions and 1 deletions
|
@ -134,6 +134,18 @@ describe("util", function()
|
|||
input = { { a = 1 }, { b = 2, a = vim.NIL } },
|
||||
output = { b = 2 },
|
||||
},
|
||||
{
|
||||
input = { { 1, 2, __extend = true }, { 3, 4 } },
|
||||
output = { 1, 2, 3, 4, __extend = true },
|
||||
},
|
||||
{
|
||||
input = { { 1, 2, __extend = true }, { __extend = true, 3, 4 } },
|
||||
output = { 1, 2, 3, 4, __extend = true },
|
||||
},
|
||||
{
|
||||
input = { { 1, 2 }, { 3, 4, __extend = true } },
|
||||
output = { 1, 2, 3, 4, __extend = true },
|
||||
},
|
||||
}
|
||||
|
||||
for _, test in ipairs(tests) do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue