feat(lua): add vim.list.unique()

Problem:
No way to deduplicate values in a list in-place

Solution:
Add `vim.list.unique()`
This commit is contained in:
Lewis Russell
2025-07-25 15:12:23 +01:00
committed by Lewis Russell
parent 7a051a4c38
commit cf9b36f3d9
7 changed files with 114 additions and 0 deletions

View File

@@ -10628,6 +10628,8 @@ function vim.fn.undofile(name) end
--- @return vim.fn.undotree.ret
function vim.fn.undotree(buf) end
--- Note: Prefer |vim.list.unique()| in Lua.
---
--- Remove second and succeeding copies of repeated adjacent
--- {list} items in-place. Returns {list}. If you want a list
--- to remain unmodified make a copy first: >vim