fix(ui): use Snacks.util.color instead of LazyVim.ui.fg

This commit is contained in:
Folke Lemaitre
2024-12-12 07:36:09 +01:00
parent e389a5ada9
commit 6d774ba8f2
4 changed files with 15 additions and 13 deletions

View File

@ -13,6 +13,12 @@ M.moved = {
ui = {
statuscolumn = { "Snacks.statuscolumn" },
bufremove = { "Snacks.bufdelete" },
fg = {
"{ fg = Snacks.util.color(...) }",
fn = function(...)
return { fg = Snacks.util.color(...) }
end,
},
},
}
@ -33,6 +39,9 @@ function M.decorate(name, mod)
if M.moved[name][k] then
local to = M.moved[name][k][1]
LazyVim.deprecate("LazyVim." .. name .. "." .. k, to)
if M.moved[name][k].fn then
return M.moved[name][k].fn
end
local ret = vim.tbl_get(_G, unpack(vim.split(to, ".", { plain = true })))
return ret
end