Skip to content

Latest commit

 

History

History
130 lines (122 loc) · 4.09 KB

README.md

File metadata and controls

130 lines (122 loc) · 4.09 KB

Language : English | Indonesia

License: Apache Neovim version Lua version Repo Size Downloads Latest Release Last Commit Open Issues

Plugin Nvim MuryP Git

easy use git and git issue in nvim, with telescope.

feature

  • shortcut : git commit, push, ssh add, pull
  • gh issue : CRUD

requirement

  • gh cli : use for issue
  • whichkey : for mapping
  • git
  • nvim 0.8+
  • telescope : for list option

install

  • packer
use {
  'muryp/nvim-muryp-git',
  after = 'telescope.nvim',
  config = function()
    require('nvim-muryp-git').setup {
      -- mapping = {
        -- issue = function()
        --   add mapping issue in here
        -- end,
        -- git = function()
        --   add mapping git in here
        -- end,
      -- },
      SSH_PATH = { '~/ssh/github' },
      CACHE_DIR = function()
        return 'string'
      end, 
    }
  end
}

how use it

git

use <leader>g then will show what can do (wichkey required) :

  • <leader>ga : add gh issue
  • <leader>gb : branch
  • <leader>gc : commit
  • <leader>ge : push
  • <leader>gf : gitflow
  • <leader>gh : history gh issue
  • <leader>gi : gh issue (online)
  • <leader>gpp : git add all, commit, ssh, pull, and push to git
  • <leader>gps : git ssh, pull, and push to git
  • <leader>gpa : git push all to git
  • <leader>gPP : pull request
  • <leader>gPA : pull request --all
  • <leader>gs : status/list uncommited
  • <leader>gv : add and commit
  • <leader>gop : git add all, commit, ssh, pull, and push to git with opts remote name
  • <leader>goP : git pull with opts remote name

github issue

  • use <leader>gi to get list issue (online) or
  • use <leader>gh to get list issue (offline)
  • after choose issue, press <leader><leader>g then will show what we can do

Api

  • git commit
---cmd add and commits
require('nvim-muryp-git.git').gitCommit()
  • add ssh
---generate string cmd to add ssh
---@param FIRST_LETTER string FIRST_LETTER cmd
---@return string
require('nvim-muryp-git.git').addSsh(' && ')
  • sshpush
---@param opts string | nil remote
---@return nil vim.cmd commit, pull, push with ssh,
require('nvim-muryp-git.git').gitSshPush()
  • pull
---@param opts string | nil remote name
---@return nil vim.cmd pull with ssh,
require('nvim-muryp-git.git').pull()
  • edit in cli
require('nvim-muryp-git.telescope.gh.ghIssue.maps').edit()
  • open in browser
require('nvim-muryp-git.telescope.gh.ghIssue.maps').open()
  • update local file
require('nvim-muryp-git.telescope.gh.ghIssue.maps').push()
  • delete issue

warning: this really delete issue on github

require('nvim-muryp-git.telescope.gh.ghIssue.maps').delete()
  • update local file with number
require('nvim-muryp-git.telescope.gh.ghIssue.maps').addIssue()

Telescope Register

  • Telescope git_flow : checkout and merge
  • Telescope git_issue : get list issue online and create chachce then open
  • Telescope git_issue : get list issue online and create chachce then open

Lisensi

The nvim-muryp-git plugin is distributed under the Apache License 2.0. Please refer to the LICENSE file for more information about this license.

Contributing

We greatly appreciate contributions from anyone can produce issue or maintaine code to help this repo. Please read CONTRIBUTE.md for more info.