mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 18:58:12 +00:00
docs(dashboard): added keymaps/actions to the github example
This commit is contained in:
parent
cda695e53f
commit
9963fa2452
1 changed files with 22 additions and 0 deletions
|
@ -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,
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue