fix(extras): load prettier extra before svelte/astro

This commit is contained in:
Folke Lemaitre 2024-06-07 23:02:13 +02:00
parent 945143a34e
commit 49805748d4
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -2,13 +2,14 @@ local Config = require("lazyvim.config")
-- Some extras need to be loaded before others -- Some extras need to be loaded before others
local prios = { local prios = {
["lazyvim.plugins.extras.editor.aerial"] = 100,
["lazyvim.plugins.extras.editor.outline"] = 100,
["lazyvim.plugins.extras.editor.trouble-v3"] = 100,
["lazyvim.plugins.extras.lang.typescript"] = 5,
["lazyvim.plugins.extras.ui.edgy"] = 2,
["lazyvim.plugins.extras.test.core"] = 1, ["lazyvim.plugins.extras.test.core"] = 1,
["lazyvim.plugins.extras.dap.core"] = 1, ["lazyvim.plugins.extras.dap.core"] = 1,
["lazyvim.plugins.extras.ui.edgy"] = 2,
["lazyvim.plugins.extras.lang.typescript"] = 5,
["lazyvim.plugins.extras.formatting.prettier"] = 10,
-- default priority is 50
["lazyvim.plugins.extras.editor.aerial"] = 100,
["lazyvim.plugins.extras.editor.outline"] = 100,
} }
---@type string[] ---@type string[]
@ -24,8 +25,8 @@ if vim.tbl_contains(compat, v) then
end end
table.sort(extras, function(a, b) table.sort(extras, function(a, b)
local pa = prios[a] or 10 local pa = prios[a] or 50
local pb = prios[b] or 10 local pb = prios[b] or 50
if pa == pb then if pa == pb then
return a < b return a < b
end end