mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-21 16:39:06 +02:00
fix(extras): prevent duplicate extra imports
This commit is contained in:
parent
ee2e876252
commit
935bc2283f
1 changed files with 11 additions and 0 deletions
|
@ -8,6 +8,17 @@ local prios = {
|
|||
["lazyvim.plugins.extras.dap.core"] = 1,
|
||||
}
|
||||
|
||||
local used = {} ---@type table<string, boolean>
|
||||
|
||||
---@type string[]
|
||||
Config.json.data.extras = vim.tbl_filter(function(extra)
|
||||
if used[extra] then
|
||||
return false
|
||||
end
|
||||
used[extra] = true
|
||||
return true
|
||||
end, Config.json.data.extras)
|
||||
|
||||
table.sort(Config.json.data.extras, function(a, b)
|
||||
local pa = prios[a] or 10
|
||||
local pb = prios[b] or 10
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue