diff --git a/lua/lazyvim/plugins/extras/util/gh.lua b/lua/lazyvim/plugins/extras/util/gh.lua new file mode 100644 index 00000000..b5991781 --- /dev/null +++ b/lua/lazyvim/plugins/extras/util/gh.lua @@ -0,0 +1,63 @@ +return { + + -- depends on the git extra for highlighting and auto-completion of github issues/prs + { import = "lazyvim.plugins.extras.lang.git" }, + + -- gh.nvim + { + "ldelossa/gh.nvim", + dependencies = { + { + "ldelossa/litee.nvim", + config = function() + require("litee.lib").setup() + end, + }, + }, + config = function() + require("litee.gh").setup() + end, + keys = { + { "gcc", "GHCloseCommit", desc = "Close" }, + { "gce", "GHExpandCommit", desc = "Expand" }, + { "gco", "GHOpenToCommit", desc = "Open To" }, + { "gcp", "GHPopOutCommit", desc = "Pop Out" }, + { "gcz", "GHCollapseCommit", desc = "Collapse" }, + + { "gpc", "GHClosePR", desc = "Close" }, + { "gpd", "GHPRDetails", desc = "Details" }, + { "gpe", "GHExpandPR", desc = "Expand" }, + { "gpo", "GHOpenPR", desc = "Open" }, + { "gpp", "GHPopOutPR", desc = "Pop Out" }, + { "gpr", "GHRefreshPR", desc = "Refresh" }, + { "gpt", "GHOpenToPR", desc = "Open To" }, + { "gpz", "GHCollapsePR", desc = "Collapse" }, + + { "grb", "GHStartReview", desc = "Begin" }, + { "grc", "GHCloseReview", desc = "Close" }, + { "grd", "GHDeleteReview", desc = "Delete" }, + { "gre", "GHExpandReview", desc = "Expand" }, + { "grs", "GHSubmitReview", desc = "Submit" }, + { "grz", "GHCollapseReview", desc = "Collapse" }, + + { "gtc", "GHCreateThread", desc = "Create" }, + { "gtn", "GHNextThread", desc = "Next" }, + { "gtt", "GHToggleThread", desc = "Toggle" }, + + { "ge", "LTPanel", desc = "Toggle GitHub Panel" }, + }, + }, + + { + "folke/which-key.nvim", + opts = { + spec = { + { "gc", group = "commits", icon = { icon = "", color = "green" } }, + { "gp", group = "pr", icon = { icon = "", color = "green" } }, + { "gr", group = "review", icon = { icon = "", color = "green" } }, + { "gt", group = "threads", icon = { icon = "", color = "green" } }, + { "gi", "GHOpenIssue", desc = "List Issues", icon = { icon = "", color = "green" } }, + }, + }, + }, +}