[!NOTE] This plugin is pretty sweet, but still WIP/beta. PRs/feedback welcome!
Work with GitHub in Neovim. Guh is ~2k lines of unimpeachable code, leveraging builtin Nvim
mechanisms such as diagnostics, 'scrollbind', progress messages and 'winbar', otherwise delegating
to the gh CLI in a :terminal buffer.
:GuhRun :Guh to see the current repo status (commits/PRs/issues), or the global "guh://status"
(notifications) page if no repo can be guessed from the current buffer or directory.
:Guh
Run :Guh <target> to view a PR/issue/commit/repo.
" PR or issue number (current repo)
:Guh 35951
" Commit SHA
:Guh a1b2c3d
" Branch
:Guh neovim/neovim/tree/release-0.11
" GitHub URL
:Guh https://github.com/neovim/neovim/pull/35951
:Guh https://github.com/neovim/neovim/commit/a1b2c3d
:Guh https://github.com/neovim/neovim/tree/release-0.11
" Slug ("owner/repo#123" or "owner/repo")
:Guh neovim/neovim#35951
:Guh neovim/neovim
" guh:// URI
:Guh guh://neovim/neovim/pr/35951
" Cursor target
:Guh .
Inside any guh:// buffer,
g? to see the keymaps.<Enter> to open the target at cursor.- to go "up" (to PR overview ⇒ repo overview ⇒ user notifications).gX to open the github.com web UI of the current buffer.When viewing a PR,
vim.diagnostic),
(3) loaded in quickfix.(viewed) <path> line.Editable buffers (comments, merge message) confirm the action on write-and-close (ZZ submits, ZQ
discards).
Keymaps are provided as <Plug>(guh-…). To customize, just define a mapping to the relevant
<Plug>(guh-…) and Guh will skip its default.
See help file for details.
vim.pack.add{ 'https://github.com/justinmk/guh.nvim' }
Requirements:
guh.nvim was originally forked (and completely rewritten) from https://github.com/daliusd/ghlite.nvim by Dalius Dobravolskas.