Skip to content

PatOConnor43/octo.nvim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

octo.nvim

Plugin to work with GitHub issues and PRs from Neovim. Just edit the issue description/comments and save it with :w. Modified description or comments are highlighted in the signcolumn.

Installation

Use your favourite plugin manager to install it. eg:

Plug 'pwntester/octo.nvim'

Requirements

  • Install GitHub CLI
  • Install telescope.nvim for using the ListXXX commands which enables to fuzzy pick issues from a dropdown menu.
Plug 'nvim-lua/popup.nvim'
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim'

Commands

There is only an Octo <object> <action> [arguments] command:

Object Action Arguments
issue close
open
create [repo]
edit [repo]
list [repo] [key=value]*
Available keys: author|assignee|mention|label|milestone|state|limit
Mappings:
<CR>: Edit issue
<C-t>: Opens issue in web browser
pr list [repo] [key=value]*
Available keys: assignee|label|state|base|limit
Mappings:
<CR>: Edit PR
<C-t>: Opens PR in web browser
<C-o>: Checkout PR
edit [repo]
checkout
commits
files
gist list [repo] [key=value]*
Available keys: repo|public|secret
Mappings:
<CR>: Append Gist to buffer
<C-t>: Opens Gist in web browser
comment add
delete
label add
delete
assignees add
delete
reviewer add
delete
reaction add <+1|-1|eyes|laugh|confused|rocket|hooray>
delete <+1|-1|eyes|laugh|confused|rocket|hooray>
  • If repo is not provided, it will be derived from <cwd>/.git/config.

Examples:

Octo issue create
Octo issue create pwntester/octo.nvim
Octo comment add
Octo reaction add hooray
Octo issue edit pwntester/octo.nvim 1
Octo issue edit 1

Usage

Just edit the issue title, description or comments as a regular buffer and use :w(rite) to sync the issue with GitHub.

Completion

<C-x><C-o>: When cursor is located at text that matches #\d* will popup a list of repo issues starting with the same id prefix.

In-issue mappings

Mapping Description
<space>gi navigate to a local repo issue
<space>ca add comment
<space>cd delete comment
<space>ic close issue
<space>io reopen issue
<space>il list open issues on same repo
<space>co checkout pull request
<space>cm list pull request commits
<space>cf list pull request files
<space>la add label
<space>ld delete label
<space>aa add assignee
<space>ad delete assignee
<space>va request reViewer
<space>vd delete reViewer
<space>rh add ❤️ reaction
<space>rp add :hooray: reaction
<space>re add 👀 reaction
<space>rl add :laugh: reaction
<space>rc add 😕 reaction
<space>r+ add 👍 reaction
<space>r- add 👎 reaction
<space>rr add 🚀 reaction

Highlight groups

Name Default
OctoNvimDirty ErrorMsg
OctoNvimCommentHeading PreProc
OctoNvimCommentUser Underlined
OctoNvimIssueTitle PreProc
OctoNvimIssueId Question
OctoNvimIssueOpen MoreMsg
OctoNvimIssueClosed ErrorMsg
OctoNvimEmpty Comment
OctoNvimFloat NormalNC

Credits

All List commands are taken from @windwp Telescope extension and adapted to edit issues.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 96.6%
  • Vim Script 3.4%