Skip to content

๐Ÿ™ ndoo.nvim - simple utils for working with Github, Bitbucket and GitLab inside Neovim.

Notifications You must be signed in to change notification settings

mistweaverco/ndoo.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

36 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Ndoo Logo

ndoo.nvim

Lua GitHub release (latest by date)

Requirements โ€ข Install โ€ข Usage

A minimal Git-Multi-Platform Interface for Neovim.

Ndoo is swahili for "bucket".

It has nothing to do with bitbucket, but it's a cool name for a collection of a Git-Multi-Platform Interface.

It gives you quick access to your Github and Bitbucket repositories from within Neovim.

Requirements

Install

Via lazy.nvim:

require('lazy').setup({
  -- Github Integration
  {
    'mistweaverco/ndoo.nvim',
    dependencies = {
      'nvim-telescope/telescope.nvim'
    }
  },
})

Configfile

Create a ~/.config/ndoo/config.json file with the following content:

{
  "bitbucket_use_jira_issues": true,
  "bitbucket_username": "gorillamoe",
  "bitbucket_app_password": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}

The bitbucket_use_jira_issues key optional and only needed if you want to use the Jira integration in your Bitbucket repositories.

The bitbucket_username and bitbucket_app_password are required for the Bitbucket integration.

You can obtain the bitbucket_app_password by going to your Bitbucket settings and creating a new app password.

The username is your Bitbucket username.

Public methods

require('ndoo').open()

Opens up the Github Web-IDE with the current line pre-selected (on the current branch).

open normal mode

Can be used from visual mode when passing { v = true } (require('ndoo').open({ v = true })) which will then pre-select the visually selected lines (on the current branch).

open visual mode

NOTE: additionally commit = true can be passed which will open the current commit, rather than the current branch.

require('ndoo').repo()

Opens up the base Github page of the current git repository you're in.

repo

require('ndoo').commit()

Prompts you for a commit hash and opens up the Github web-view of this commit.

commit

If you leave the prompt empty and press enter, the Github web-view of all commits for the current branch will be opened.

commit blank

require('ndoo').pulls()

Lists all open pull-requests. Takes you to the web-view of the pull-request selected.

pulls

require('ndoo').issues()

Lists all open issues. Takes you to the web-view of the issue selected.

issues

require('ndoo').pipelines()

Takes you to the web-view of the pipelines.

actions

require('ndoo').labels()

Lists all labels. Takes you to the web-view of the label selected.

labels

Configuration

With which-key.nvim:

-- Mappings for normal mode
wk.register({
  g = {
    name = "Goto",
      h = {
        name = "Git Utils",
        o = { "<Cmd>lua require('ndoo').open()<CR>", "Open" },
        O = { "<Cmd>lua require('ndoo').open({ commit = true })<CR>", "Open commit" },
        r = { "<Cmd>lua require('ndoo').repo()<CR>", "Repo" },
        c = { "<Cmd>lua require('ndoo').commit()<CR>", "Commit" },
        p = { "<Cmd>lua require('ndoo').pulls()<CR>", "Pulls" },
        i = { "<Cmd>lua require('ndoo').issues()<CR>", "Issues" },
        a = { "<Cmd>lua require('ndoo').pipelines()<CR>", "Pipelines" },
        l = { "<Cmd>lua require('ndoo').labels()<CR>", "Labels" },
      },
  },
}, { prefix = "<leader>" })

-- Mappings for visual mode
wk.register({
  g = {
    name = "Goto",
      h = {
        name = "Git Utils",
        o = { "<Cmd>lua require('ndoo').open({ v = true })<CR>", "Open" },
        O = { "<Cmd>lua require('ndoo').open({ v = true, commit = true })<CR>", "Open commit" },
      },
  },
}, { prefix = "<leader>", mode = "v" })

About

๐Ÿ™ ndoo.nvim - simple utils for working with Github, Bitbucket and GitLab inside Neovim.

Topics

Resources

Stars

Watchers

Forks

Languages