Skip to content

Commit

Permalink
build(docs): auto generate vim documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jun 10, 2024
1 parent e14349c commit a5b7b64
Showing 1 changed file with 42 additions and 29 deletions.
71 changes: 42 additions & 29 deletions doc/gh-navigator.nvim.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Table of Contents *gh-navigator.nvim-table-of-contents*

1. gh-navigator.nvim |gh-navigator.nvim-gh-navigator.nvim|
- Setup |gh-navigator.nvim-gh-navigator.nvim-setup|
- Commands |gh-navigator.nvim-gh-navigator.nvim-commands|
- Usage |gh-navigator.nvim-gh-navigator.nvim-usage|
2. Links |gh-navigator.nvim-links|

Expand All @@ -22,18 +21,20 @@ SETUP *gh-navigator.nvim-gh-navigator.nvim-setup*

PREREQUISITES ~

The plugin is mostly a wrapper around the GitHub CLI <https://cli.github.com/>
tool, `gh`, with a few direct calls to `git`. So ensure the `gh` tool is
installed and can connect to your GitHub account.
The plugin primarily acts as a wrapper for the GitHub CLI
<https://cli.github.com/> (`gh`), and also makes a few direct `git` calls. So
ensure the `gh` tool is installed and can connect to your GitHub account.

An example of how to setup `gh` for a macOS user is:
Here are instructions for macOS users:

1. Install `gh` and connect it to your GitHub account.

>shell
brew install gh
gh auth login
<

If you already have the `gh` tool installed, ensure it’s working:
1. If `gh` is already installed, check it’s working with:

>shell
gh auth status
Expand All @@ -42,8 +43,8 @@ If you already have the `gh` tool installed, ensure it’s working:

INSTALLATION ~

Install **gh-navigator** using your plugin manager of choice. For example, here
it is using lazy.nvim <https://github.com/folke/lazy.nvim>.
Install **gh-navigator** via your preferred plugin manager. The following
example uses lazy.nvim <https://github.com/folke/lazy.nvim>.

>lua
{
Expand All @@ -53,39 +54,51 @@ it is using lazy.nvim <https://github.com/folke/lazy.nvim>.
}
<

I’ll also be actively developing this plugin using the `main` branch, so use
versioned releases with the `version` key to avoid unexpected breaking changes.

[!IMPORTANT] This plugin is actively developed on the `main` branch. I
recommend using versioned releases with the _version_ key to avoid unexpected
breaking changes.

USAGE *gh-navigator.nvim-gh-navigator.nvim-usage*

COMMANDS *gh-navigator.nvim-gh-navigator.nvim-commands*
`GH` is the main command, but it accepts different sub-commands:

-----------------------------------------------------------------------
Command Description
----------------------------- -----------------------------------------
GH Heuristically open commit sha or PR using
number or search term(s)

GHBlame Open the current file in blame view
GH COMMAND ~

GHBrowse Open the current file in blob view
Move the cursor over a commit SHA, PR number, or search term and run the `GH`
command to open it on GitHub. The term under the cursor will be used as the
argument.

GHPR Open PR by commit SHA, PR number, or
search term(s)

GHRepo Open the current repo
-----------------------------------------------------------------------
SUB-COMMANDS ~

USAGE *gh-navigator.nvim-gh-navigator.nvim-usage*
--------------------------------------------------------------------------
Sub-Command Description
--------------------------------------- ----------------------------------
GH blame Opens the current file in GitHub’s
blame view.

Move the cursor over a sha, PR number, or word and execute the commands. The
word under the cursor will be the argument.
GH browse Opens the current file in GitHub’s
blob view.

You can also call them with an argument. `:GHPR 1234` or `:GHPR c2d25b3` or
`:GH refactor the actor class`
GH pr <arg> Opens a PR based on a commit SHA,
PR number, or search term (e.g.,
GH pr 1234, GH pr c2d25b3, or
GH pr refactor the actor class).

Most commands accept a range. For example, highlight the lines you want to
blame and execute `:GHBlame`.
GH repo <path> Opens a certain path in the
current repo on GitHub (e.g.,
GH repo issues opens the repo’s
issues page). Auto-completion is
available for paths such as
issues, pulls, actions, releases,
etc.
--------------------------------------------------------------------------

[!Note] Both `GH browse` and `GH blame` can accept a range. For instance, in
visual mode (**V**), select a set of lines and run `GH blame` to open the blame
view for that selection.
==============================================================================
2. Links *gh-navigator.nvim-links*

Expand Down

0 comments on commit a5b7b64

Please sign in to comment.