mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-21 16:39:06 +02:00
fix(extras): make sure we use priorities to import extras in correct order
This commit is contained in:
parent
3256abda65
commit
a4e393154f
2 changed files with 18 additions and 14 deletions
|
@ -1,5 +1,22 @@
|
|||
local Config = require("lazyvim.config")
|
||||
|
||||
-- Some extras need to be loaded before others
|
||||
local prios = {
|
||||
["editor.aerial"] = 100,
|
||||
["editor.symbols-outline"] = 100,
|
||||
["test.core"] = 1,
|
||||
["dap.core"] = 1,
|
||||
}
|
||||
|
||||
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)
|
||||
|
||||
---@param extra string
|
||||
return vim.tbl_map(function(extra)
|
||||
return { import = "lazyvim.plugins.extras." .. extra }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue