docs(dashboard): added keymaps/actions to the github example

This commit is contained in:
Folke Lemaitre 2024-12-02 17:00:37 +01:00
parent cda695e53f
commit 9963fa2452
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -80,12 +80,26 @@ M.examples.github = {
padding = 1,
},
{ section = "keys", gap = 1, padding = 1 },
{
pane = 2,
icon = "",
desc = "Browse Repo",
padding = 1,
key = "b",
action = function()
Snacks.gitbrowse()
end,
},
function()
local in_git = Snacks.git.get_root() ~= nil
local cmds = {
{
title = "Notifications",
cmd = "gh notify -s -a -n5",
action = function()
vim.ui.open("https://github.com/notifications")
end,
key = "n",
icon = "",
height = 5,
enabled = true,
@ -93,6 +107,10 @@ M.examples.github = {
{
title = "Open Issues",
cmd = "gh issue list -L 3",
key = "i",
action = function()
vim.fn.jobstart("gh issue list --web", { detach = true })
end,
icon = "",
height = 7,
},
@ -100,6 +118,10 @@ M.examples.github = {
icon = "",
title = "Open PRs",
cmd = "gh pr list -L 3",
key = "p",
action = function()
vim.fn.jobstart("gh pr list --web", { detach = true })
end,
height = 7,
},
{