diff --git a/lua/plugins/themes/_globalvar.lua b/lua/plugins/themes/_globalvar.lua index 9773d8b..be69a19 100644 --- a/lua/plugins/themes/_globalvar.lua +++ b/lua/plugins/themes/_globalvar.lua @@ -37,6 +37,20 @@ _G.idxOf = function(array, value) return nil end +_G.unique_list = function(list) + local seen = {} + local result = {} + + for _, val in ipairs(list) do + if not seen[val] then + table.insert(result, val) + seen[val] = true + end + end + + return result +end + -- run if rust config true if pcode.active_rust_config then table.insert(pcode.mason_ensure_installed, "rust_analyzer")