feat(extras): added extra for the nvim-treesitter rewrite. Some plugins are not compatible and will be disabled.

This commit is contained in:
Folke Lemaitre 2024-05-16 20:52:53 +02:00
parent 66dc9c09d6
commit 20081460b6
2 changed files with 108 additions and 0 deletions

View file

@ -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