feat(snack.dashboard):add git status and projects sections

This commit is contained in:
phucisstupid 2025-09-21 20:22:02 +07:00 committed by GitHub
parent 13069f2018
commit f978b89834
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -322,6 +322,26 @@ return {
{ icon = "󰒲 ", key = "l", desc = "Lazy", action = ":Lazy" },
{ icon = "", key = "q", desc = "Quit", action = ":qa" },
},
sections = {
{ section = "header" },
{ icon = "", title = "Keymaps", section = "keys", indent = 2, padding = 1 },
{ icon = "", title = "Projects", section = "projects", indent = 2, padding = 1 },
{
icon = "",
title = "Git Status",
section = "terminal",
enabled = function()
return Snacks.git.get_root() ~= nil
end,
cmd = "git status --short --branch --renames",
height = 5,
padding = 1,
ttl = 5 * 60,
indent = 3,
},
{ section = "startup" },
},
},
},
},