2023-10-11 17:48:40 +02:00
|
|
|
local Config = require("lazyvim.config")
|
|
|
|
|
2023-10-12 11:14:02 +02:00
|
|
|
-- Some extras need to be loaded before others
|
|
|
|
local prios = {
|
2023-10-12 21:47:31 +02:00
|
|
|
["lazyvim.plugins.extras.editor.aerial"] = 100,
|
2024-03-07 20:43:13 +01:00
|
|
|
["lazyvim.plugins.extras.editor.outline"] = 100,
|
2024-03-28 22:11:51 +01:00
|
|
|
["lazyvim.plugins.extras.editor.trouble-v3"] = 100,
|
2024-06-01 08:31:10 +02:00
|
|
|
["lazyvim.plugins.extras.lang.typescript"] = 5,
|
2024-05-27 17:38:30 +02:00
|
|
|
["lazyvim.plugins.extras.ui.edgy"] = 2,
|
2023-10-12 21:47:31 +02:00
|
|
|
["lazyvim.plugins.extras.test.core"] = 1,
|
|
|
|
["lazyvim.plugins.extras.dap.core"] = 1,
|
2023-10-12 11:14:02 +02:00
|
|
|
}
|
|
|
|
|
2024-03-08 11:51:18 +01:00
|
|
|
---@type string[]
|
2024-05-18 21:52:16 +02:00
|
|
|
Config.json.data.extras = LazyVim.dedup(Config.json.data.extras)
|
2024-03-08 11:51:18 +01:00
|
|
|
|
2023-10-12 11:14:02 +02:00
|
|
|
table.sort(Config.json.data.extras, function(a, b)
|
|
|
|
local pa = prios[a] or 10
|
|
|
|
local pb = prios[b] or 10
|
|
|
|
if pa == pb then
|
|
|
|
return a < b
|
|
|
|
end
|
|
|
|
return pa < pb
|
|
|
|
end)
|
|
|
|
|
2023-10-11 17:48:40 +02:00
|
|
|
---@param extra string
|
|
|
|
return vim.tbl_map(function(extra)
|
2023-10-12 21:47:31 +02:00
|
|
|
return { import = extra }
|
2023-10-11 17:48:40 +02:00
|
|
|
end, Config.json.data.extras)
|