mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-22 08:53:33 +02:00
feat(extras): added extra for the nvim-treesitter
rewrite. Some plugins are not compatible and will be disabled.
This commit is contained in:
parent
66dc9c09d6
commit
20081460b6
2 changed files with 108 additions and 0 deletions
|
@ -170,4 +170,19 @@ function M.safe_keymap_set(mode, lhs, rhs, opts)
|
|||
end
|
||||
end
|
||||
|
||||
---@generic T
|
||||
---@param list T[]
|
||||
---@return T[]
|
||||
function M.dedup(list)
|
||||
local ret = {}
|
||||
local seen = {}
|
||||
for _, v in ipairs(list) do
|
||||
if not seen[v] then
|
||||
table.insert(ret, v)
|
||||
seen[v] = true
|
||||
end
|
||||
end
|
||||
return ret
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue