Language : English | Indonesia
easy use git and git issue in nvim, with telescope.
- shortcut : git commit, push, ssh add, pull
- gh issue : CRUD
- gh cli : use for issue
- whichkey : for mapping
- git
- nvim 0.8+
- telescope : for list option
- 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
}
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
- 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
- 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 git_flow
: checkout and mergeTelescope git_issue
: get list issue online and create chachce then openTelescope git_issue
: get list issue online and create chachce then open
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.
We greatly appreciate contributions from anyone can produce issue or maintaine code to help this repo. Please read CONTRIBUTE.md
for more info.