Giter Club home page Giter Club logo

gh-navigator.nvim's Introduction

gh-navigator.nvim

This Neovim plugin makes jumping from coding to GitHub as painless as possible.

build release

Setup

Prerequisites

The plugin primarily acts as a wrapper for the GitHub CLI (gh), and also makes a few direct git calls. So ensure the gh tool is installed and can connect to your GitHub account.

Here are instructions for macOS users:

  1. Install gh and connect it to your GitHub account.
brew install gh
gh auth login
  1. If gh is already installed, check it's working with:
gh auth status

Installation

Install gh-navigator via your preferred plugin manager. The following example uses lazy.nvim.

{
  'wassimk/gh-navigator.nvim',
  version = "*",
  config = true
}

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 is the main command, but it accepts different sub-commands:

GH Command

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.

Sub-Commands

Sub-Command Description
GH blame Opens the current file in GitHub's blame view.
GH browse Opens the current file in GitHub's blob view.
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).
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.

gh-navigator.nvim's People

Contributors

wassimk avatar github-actions[bot] avatar jlsherrod avatar

Stargazers

Mika Vilpas avatar  avatar Christian McCormick avatar Tim Morgan avatar Yuta Katayama avatar

Watchers

 avatar

Forkers

jlsherrod

gh-navigator.nvim's Issues

GHFile links broken

When I use the GHFile command it opens the link in my browser with a 404 error to the absolute path in my project. For example "/Users/jlsherrod/project/src/App.js", but the actual URL in Github is a relative path "./src/App.js".

I may have a fix. I'll open a PR so you can take a look.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.