neoclide/coc-git — a developer tool — sits at 424 GitHub stars in the Developer Tools space. Git integration of coc.nvim
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
Note: many useful features not implemented, it's recommended to
use plugin like vim-fugitive at the
same time.
Install
In your vim/neovim, run command:
:CocInstall coc-git
Why
Always async.
Always refresh on TextChange.
Powerful list support.
Semantic commit and github issues completion support.
Features
Sign support for git status of current buffer.
Git status of current project, by g:coc_git_status.
Git status of current buffer, byb:coc_git_status.
Git status of current line, byb:coc_git_blame for statusline, and addGBlameToVirtualText for inline blames.
Git related lists, including issues, gfiles, gstatus, commits, branches & bcommits
Keymaps for git chunks, including <Plug>(coc-git-chunkinfo)<Plug>(coc-git-nextchunk) & <Plug>(coc-git-prevchunk) ,
Commands for chunks, including git.chunkInfogit.chunkStagegit.chunkUndo and more.
Keymaps & commands for git conflicts.
Completion support for semantic commit.
Completion support for GitHub/GitLab issues.
Note for GitHub issues completion support:
GITHUB_API_TOKEN=xxx needs to be set in env to fetch issues from private repositories
Note for GitLab issues completion support:
current only API v4 support, which availabled since GitLab 9.0
GITLAB_PRIVATE_TOKEN=XXX needs to be set in env, check Personal access tokens
GitLab host needs to be set in coc-settings.json, for example "git.gitlab.hosts": ["gitlab.example.com", "gitlab.com"]
Configuration
git.command: Command for git, could be absolute path of git executable., default: "git"
git.remoteName: Remote name for fetch github issues., default: "origin"
git.diffOptions: Options for git diff command, eg: ["--ignore-all-space"], default: []
git.foldContext: Line count to leave below and above the fold, default: 0.
git.browserRemoteName: Remote name for browserOpen and copyUrl., default: ""
git.browserBranchName: Branch name for browserOpen and copyUrl., default: ""
git.urlFix: a object to configure the url style of copyUrl and browserOpen, make this two command support other git services like gitlab and gitea. default: {}
When you have git.addGBlameToVirtualText enabled, use command
let g:coc_git_hide_blame_virtual_text = !get(g:, 'coc_git_hide_blame_virtual_text', 0) to dynamic toggle virtual text.
Usage
Statusline integration
g:coc_git_status including git branch and current project status.
b:coc_git_status including changed lines of current buffer.
b:coc_git_blame including blame info of current line.
If you're not using statusline plugin, you can add them to statusline by:
set statusline^=%{get(g:,'coc_git_status','')}%{get(b:,'coc_git_status','')}%{get(b:,'coc_git_blame','')}
User autocmd
autocmd User CocGitStatusChange {command}
Triggered after the g:coc_git_statusb:coc_git_statusb:coc_git_blame has changed.
Could be used for update the statusline.
Keymaps
Create keymappings like:
" navigate chunks of current buffer
nmap [g <Plug>(coc-git-prevchunk)
nmap ]g <Plug>(coc-git-nextchunk)
" navigate conflicts of current buffer
nmap [c <Plug>(coc-git-prevconflict)
nmap ]c <Plug>(coc-git-nextconflict)
" show chunk diff at current position
nmap gs <Plug>(coc-git-chunkinfo)
" show commit contains current position
nmap gc <Plug>(coc-git-commit)
" create text object for git chunks
omap ig <Plug>(coc-git-chunk-inner)
xmap ig <Plug>(coc-git-chunk-inner)
omap ag <Plug>(coc-git-chunk-outer)
xmap ag <Plug>(coc-git-chunk-outer)
Commands
Use command :CocCommand to open commands and type git. to get all git
related commands.
:CocCommand git.copyUrl Copy url of current line to clipboard.
:CocCommand git.nextChunk Navigate to the next chunk.
:CocCommand git.prevChunk Navigate to the previous chunk.
:CocCommand git.chunkInfo Show chunk info under cursor.
:CocCommand git.chunkUndo Undo current chunk.
:CocCommand git.chunkStage Stage current chunk.
:CocCommand git.chunkUnstage Unstage chunk that contains current line.
:CocCommand git.diffCached Show cached diff in preview window.
:CocCommand git.showCommit Show commit of current chunk.
:CocCommand git.browserOpen Open current line in browser
:CocCommand git.foldUnchanged Fold unchanged lines of current buffer.
:CocCommand git.toggleGutters Toggle git gutters in sign column.
:CocCommand git.push push code of current branch to remote.
Work with git lists
To open a specified coc list, you have different ways:
Run :CocList and select the list by <CR>.
Run :CocList and type name of list for completion.
Create keymap for open specified list with list options, like:
To move up&down on insertmode, use <C-j> and <C-k>
To run a action, press <tab> and select the action.
For more advance usage, checkout :h coc-list.
Issue autocomplete from multiple GitHub repositories
To enable autocompletion of issues from multiple GitHub repositories, put a comma-separated list of issue repository specifiers in the git config variable coc-git.issuesources.
An issue repository specifier looks like this: github/neoclide/coc-git.
The first part specifies the issue provider, currently only "github" is supported
The second part specifies the organization or owner of the repository
The third part specifies the repository name
Multiple repositories can be specified using comma separation, like this: github/neoclide/coc-git,github/neoclide/coc.nvim
F.A.Q
Q: Virtual text not working.
A: Make sure your neovim/vim support virtual text by command :echo has('nvim-0.5.0') || has('patch-9.0.0067').
Supporting
If you like my extension, consider supporting me on Patreon or PayPal:
No homepage URL was recorded for neoclide/coc-git in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
How does neoclide/coc-git compare to other Developer Tools projects?
neoclide/coc-git is tracked by TopGit in the Developer Tools category, with 424 GitHub stars and written in TypeScript. Browse the Developer Tools topic page on TopGit to compare it against similar projects by stars and activity.
How many stars does neoclide/coc-git have?
neoclide/coc-git has 424 GitHub stars — refresh the page for the live number, or check github.com/neoclide/coc-git. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
Is neoclide/coc-git open source?
TopGit's metadata for neoclide/coc-git does not record a license. Most public repositories on GitHub ARE open source, but the exact terms vary — verify by opening the LICENSE file directly.
What else is in the Developer Tools space?
neoclide/coc-git is tracked by TopGit under the Developer Tools category, alongside 4 GitHub-tagged topics. Trending and Topics pages list peer repositories of comparable stars and language.
What is neoclide/coc-git?
neoclide/coc-git (neoclide/coc-git) is a TypeScript project on GitHub. From the project's own README: Git integration of coc.nvim
Where do I read more about neoclide/coc-git?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/neoclide/coc-git is the definitive source.
Read full README in the tab above.
Curious whether coc-git is right for you?
Let ChatGPT, Claude, or Perplexity look into it — click below and see what AI actually says about coc-git.