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

@@ -12856,6 +12856,8 @@ M.funcs = {
base = 1,
tags = { 'E882' },
desc = [=[
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