coc-git 2.7.8 → 2.7.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENCE ADDED
@@ -0,0 +1,19 @@
1
+ Copyright 2026 chemzqm@gmail.com
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the "Software"),
5
+ to deal in the Software without restriction, including without limitation
6
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
7
+ and/or sell copies of the Software, and to permit persons to whom the
8
+ Software is furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included
11
+ in all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
14
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
15
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
16
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
17
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
18
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
19
+ OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/Readme.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # coc-git
2
2
 
3
+ <p align="center">
4
+ <img src="assets/coc-git-logo.png" alt="coc-git logo" width="180">
5
+ </p>
6
+
3
7
  [![CI](https://github.com/neoclide/coc-git/actions/workflows/ci.yaml/badge.svg)](https://github.com/neoclide/coc-git/actions/workflows/ci.yaml)
4
8
 
5
9
  Git integration of [coc.nvim](https://github.com/neoclide/coc.nvim).
@@ -22,6 +26,7 @@ In your vim/neovim, run command:
22
26
  - Always refresh on TextChange.
23
27
  - Powerful list support.
24
28
  - Semantic commit and github issues completion support.
29
+ - Undo, stage & unstage change chunk under current cursor.
25
30
 
26
31
  ## Features
27
32
 
@@ -35,6 +40,7 @@ In your vim/neovim, run command:
35
40
  - Keymaps & commands for git conflicts.
36
41
  - Completion support for semantic commit.
37
42
  - Completion support for GitHub/GitLab issues.
43
+ - Browse files changed by any commit in a read-only `Commit Files` TreeView.
38
44
 
39
45
  **Note** for GitHub issues completion support:
40
46
 
@@ -92,8 +98,12 @@ In your vim/neovim, run command:
92
98
 
93
99
  - `git.realtimeGutters`: Update gutters in realtime, default: true., default: `true`
94
100
 
101
+ - `git.enableStagedGutters`: Show staged changes in the sign column., default: `false`
102
+
95
103
  - `git.signPriority`: Priority of sign gutters, default to `10`.
96
104
 
105
+ - `git.stagedSignPriority`: Priority of staged gutter signs., default: `9`.
106
+
97
107
  - `git.pushArguments`: Additional arguments passed to `git push`, default: `[]`.
98
108
 
99
109
  - `git.changedSign.text`: Text of changed sign., default: `"~"`
@@ -116,6 +126,22 @@ In your vim/neovim, run command:
116
126
 
117
127
  - `git.changeRemovedSign.hlGroup`: Highlight group for change removed sign., default: `"DiffChange"`
118
128
 
129
+ - `git.stagedAddedSign.text`: Text of staged added sign., default: `"┃"`
130
+
131
+ - `git.stagedAddedSign.hlGroup`: Highlight group for staged added sign., default: `"CocGitStagedAdd"`
132
+
133
+ - `git.stagedChangedSign.text`: Text of staged changed sign., default: `"┃"`
134
+
135
+ - `git.stagedChangedSign.hlGroup`: Highlight group for staged changed sign., default: `"CocGitStagedChange"`
136
+
137
+ - `git.stagedRemovedSign.text`: Text of staged removed sign., default: `"╻"`
138
+
139
+ - `git.stagedRemovedSign.hlGroup`: Highlight group for staged removed sign., default: `"CocGitStagedDelete"`
140
+
141
+ - `git.mixedSign.text`: Text of a sign shared by staged and unstaged changes., default: `"┋"`
142
+
143
+ - `git.mixedSign.hlGroup`: Highlight group for a mixed sign., default: `"CocGitMixed"`
144
+
119
145
  - `git.semanticCommit.filetypes`: Enabled filetypes, default: `["gitcommit","gina-commit"]`
120
146
 
121
147
  - `git.semanticCommit.scope`: Commit message with scope field, default: `true`
@@ -124,6 +150,8 @@ In your vim/neovim, run command:
124
150
 
125
151
  - `git.showCommitInFloating`: Show commit in floating or popup window, default: `false`
126
152
 
153
+ - `git.commitFiles.splitCommand`: Command used to open the changed-files TreeView for a commit, default: `"belowright 40vs"`
154
+
127
155
  - `git.floatConfig`: Configure style of float window/popup, extends from floatFactory.floatConfig, default: `{}`.
128
156
 
129
157
  - `git.gitlab.hosts`: Custom GitLab hosts, default: `["gitlab.com"]`
@@ -263,6 +291,7 @@ related commands.
263
291
  - `:CocCommand git.chunkUnstage` Unstage chunk that contains current line.
264
292
  - `:CocCommand git.diffCached` Show cached diff in preview window.
265
293
  - `:CocCommand git.showCommit` Show commit of current chunk.
294
+ - `:CocCommand git.showCommitTree` Open the commit associated with the current tracked line in the `Commit Files` TreeView, show the historical file, and jump to its blamed line.
266
295
  - `:CocCommand git.showBlameDoc` Show blame details for the current line.
267
296
  - `:CocCommand git.browserOpen` Open current line in browser
268
297
  - `:CocCommand git.foldUnchanged` Fold unchanged lines of current buffer.
@@ -287,6 +316,41 @@ To move up&down on insertmode, use `<C-j>` and `<C-k>`
287
316
 
288
317
  To run a action, press `<tab>` and select the action.
289
318
 
319
+ #### Commit Files TreeView
320
+
321
+ The `commits` and `bcommits` lists provide a `changes` action that opens the
322
+ selected commit in the `Commit Files` TreeView. The existing `files` action
323
+ continues to open the complete file snapshot through the `gfiles` list.
324
+
325
+ The tree compares an ordinary commit with its parent and an initial commit with
326
+ the empty tree. Merge commits use the first parent by default; choose
327
+ `Select parent…` from the root node actions to compare another parent. The root
328
+ node starts expanded, and pressing `<CR>` on it runs `Show commit`. Pressing
329
+ `<CR>` on a directory toggles it, while pressing `<CR>` on a file runs
330
+ `Show code`.
331
+
332
+ `Show code`, `Open before version`, `Open after version`, and
333
+ `Open working tree file` open in the editor window that was active before the
334
+ TreeView. For a text file, `Show code` opens a read-only
335
+ `coc-git://<commit>/<path>` buffer with `buftype=nofile` and detects the
336
+ filetype from its path. Added lines use the `DiffAdd` background, and deleted
337
+ lines are rendered as virtual text using `DiffDelete`. Deleted files open their
338
+ complete parent version; binary and non-blob entries show object metadata
339
+ instead of text decorations.
340
+
341
+ Use `<Plug>(coc-git-nextchunk)`, `<Plug>(coc-git-prevchunk)`, `git.nextChunk`,
342
+ or `git.prevChunk` to navigate changed blocks in a `coc-git://` buffer. The
343
+ navigation wraps when Vim's `wrapscan` option is enabled.
344
+
345
+ When the buffer that opened the TreeView is one of the changed files, its
346
+ parent directories are expanded and the file is focused. `git.showCommitTree`
347
+ also opens that file's historical code automatically and places the cursor on
348
+ the original line reported by `git blame`. The command reports the existing
349
+ untracked or uncommitted-line warning when Git cannot associate the current
350
+ line with a commit.
351
+
352
+ Use `git.commitFiles.splitCommand` to configure how the TreeView split opens.
353
+
290
354
  For more advance usage, checkout `:h coc-list`.
291
355
 
292
356
  ### Issue autocomplete from multiple GitHub repositories
@@ -300,19 +364,6 @@ An issue repository specifier looks like this: `github/neoclide/coc-git`.
300
364
 
301
365
  Multiple repositories can be specified using comma separation, like this: `github/neoclide/coc-git,github/neoclide/coc.nvim`
302
366
 
303
- ## F.A.Q
304
-
305
- Q: Virtual text not working.
306
-
307
- A: Make sure your neovim/vim support virtual text by command `:echo has('nvim-0.5.0') || has('patch-9.0.0067')`.
308
-
309
- ## Supporting
310
-
311
- If you like my extension, consider supporting me on Patreon or PayPal:
312
-
313
- <a href="https://www.patreon.com/chemzqm"><img src="https://c5.patreon.com/external/logo/become_a_patron_button.png" alt="Patreon donate button" /> </a>
314
- <a href="https://www.paypal.com/paypalme/chezqm"><img src="https://werwolv.net/assets/paypal_banner.png" alt="PayPal donate button" /> </a>
315
-
316
367
  ## License
317
368
 
318
369
  MIT
Binary file
package/history.md CHANGED
@@ -1,5 +1,20 @@
1
- ## 2.7.8
1
+ ## 2.7.10
2
+
3
+ - docs: add MIT license (172bdca)
4
+ - feat: add commit files TreeView (189d331)
5
+
6
+ ## 2.7.9
2
7
 
8
+ - add a read-only TreeView for files changed by a commit
9
+ - show complete commit files as decorated coc-git virtual documents with chunk navigation
10
+ - docs: add coc-git logo (992064f)
11
+ - feat: show staged git gutters and navigate chunks (9410092)
12
+ - jump to the current code (641396b)
13
+ - fix typo in warning (#222) (9317050)
14
+
15
+ ## 2.7.8
16
+ - add git.showCommitTree for the commit associated with the current line
17
+ - fix historical code cursor positioning after virtual document loading
3
18
  - use node24 for CI (eacd2a2)
4
19
  - fix uuid, use commonjs version (8ab1a44)
5
20
  - fix: narrow vim call results (b72ad90)