refactor: move 0.9 stuff to a compat layer. Cleaner this way
This commit is contained in:
@ -12,9 +12,18 @@ local prios = {
|
||||
}
|
||||
|
||||
---@type string[]
|
||||
Config.json.data.extras = LazyVim.dedup(Config.json.data.extras)
|
||||
local extras = LazyVim.dedup(Config.json.data.extras)
|
||||
|
||||
table.sort(Config.json.data.extras, function(a, b)
|
||||
local version = vim.version()
|
||||
local v = version.major .. "_" .. version.minor
|
||||
|
||||
local compat = { "0_9" }
|
||||
|
||||
if vim.tbl_contains(compat, v) then
|
||||
extras[#extras + 1] = "lazyvim.plugins.compat.nvim-" .. v
|
||||
end
|
||||
|
||||
table.sort(extras, function(a, b)
|
||||
local pa = prios[a] or 10
|
||||
local pb = prios[b] or 10
|
||||
if pa == pb then
|
||||
@ -26,4 +35,4 @@ end)
|
||||
---@param extra string
|
||||
return vim.tbl_map(function(extra)
|
||||
return { import = extra }
|
||||
end, Config.json.data.extras)
|
||||
end, extras)
|
||||
|
Reference in New Issue
Block a user