coc-git 2.7.9 → 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 +19 -0
- package/Readme.md +40 -13
- package/history.md +9 -1
- package/lib/index.js +1153 -252
- package/package.json +11 -1
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
|
@@ -26,6 +26,7 @@ In your vim/neovim, run command:
|
|
|
26
26
|
- Always refresh on TextChange.
|
|
27
27
|
- Powerful list support.
|
|
28
28
|
- Semantic commit and github issues completion support.
|
|
29
|
+
- Undo, stage & unstage change chunk under current cursor.
|
|
29
30
|
|
|
30
31
|
## Features
|
|
31
32
|
|
|
@@ -39,6 +40,7 @@ In your vim/neovim, run command:
|
|
|
39
40
|
- Keymaps & commands for git conflicts.
|
|
40
41
|
- Completion support for semantic commit.
|
|
41
42
|
- Completion support for GitHub/GitLab issues.
|
|
43
|
+
- Browse files changed by any commit in a read-only `Commit Files` TreeView.
|
|
42
44
|
|
|
43
45
|
**Note** for GitHub issues completion support:
|
|
44
46
|
|
|
@@ -148,6 +150,8 @@ In your vim/neovim, run command:
|
|
|
148
150
|
|
|
149
151
|
- `git.showCommitInFloating`: Show commit in floating or popup window, default: `false`
|
|
150
152
|
|
|
153
|
+
- `git.commitFiles.splitCommand`: Command used to open the changed-files TreeView for a commit, default: `"belowright 40vs"`
|
|
154
|
+
|
|
151
155
|
- `git.floatConfig`: Configure style of float window/popup, extends from floatFactory.floatConfig, default: `{}`.
|
|
152
156
|
|
|
153
157
|
- `git.gitlab.hosts`: Custom GitLab hosts, default: `["gitlab.com"]`
|
|
@@ -287,6 +291,7 @@ related commands.
|
|
|
287
291
|
- `:CocCommand git.chunkUnstage` Unstage chunk that contains current line.
|
|
288
292
|
- `:CocCommand git.diffCached` Show cached diff in preview window.
|
|
289
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.
|
|
290
295
|
- `:CocCommand git.showBlameDoc` Show blame details for the current line.
|
|
291
296
|
- `:CocCommand git.browserOpen` Open current line in browser
|
|
292
297
|
- `:CocCommand git.foldUnchanged` Fold unchanged lines of current buffer.
|
|
@@ -311,6 +316,41 @@ To move up&down on insertmode, use `<C-j>` and `<C-k>`
|
|
|
311
316
|
|
|
312
317
|
To run a action, press `<tab>` and select the action.
|
|
313
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
|
+
|
|
314
354
|
For more advance usage, checkout `:h coc-list`.
|
|
315
355
|
|
|
316
356
|
### Issue autocomplete from multiple GitHub repositories
|
|
@@ -324,19 +364,6 @@ An issue repository specifier looks like this: `github/neoclide/coc-git`.
|
|
|
324
364
|
|
|
325
365
|
Multiple repositories can be specified using comma separation, like this: `github/neoclide/coc-git,github/neoclide/coc.nvim`
|
|
326
366
|
|
|
327
|
-
## F.A.Q
|
|
328
|
-
|
|
329
|
-
Q: Virtual text not working.
|
|
330
|
-
|
|
331
|
-
A: Make sure your neovim/vim support virtual text by command `:echo has('nvim-0.5.0') || has('patch-9.0.0067')`.
|
|
332
|
-
|
|
333
|
-
## Supporting
|
|
334
|
-
|
|
335
|
-
If you like my extension, consider supporting me on Patreon or PayPal:
|
|
336
|
-
|
|
337
|
-
<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>
|
|
338
|
-
<a href="https://www.paypal.com/paypalme/chezqm"><img src="https://werwolv.net/assets/paypal_banner.png" alt="PayPal donate button" /> </a>
|
|
339
|
-
|
|
340
367
|
## License
|
|
341
368
|
|
|
342
369
|
MIT
|
package/history.md
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
|
+
## 2.7.10
|
|
2
|
+
|
|
3
|
+
- docs: add MIT license (172bdca)
|
|
4
|
+
- feat: add commit files TreeView (189d331)
|
|
5
|
+
|
|
1
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
|
|
3
10
|
- docs: add coc-git logo (992064f)
|
|
4
11
|
- feat: show staged git gutters and navigate chunks (9410092)
|
|
5
12
|
- jump to the current code (641396b)
|
|
6
13
|
- fix typo in warning (#222) (9317050)
|
|
7
14
|
|
|
8
15
|
## 2.7.8
|
|
9
|
-
|
|
16
|
+
- add git.showCommitTree for the commit associated with the current line
|
|
17
|
+
- fix historical code cursor positioning after virtual document loading
|
|
10
18
|
- use node24 for CI (eacd2a2)
|
|
11
19
|
- fix uuid, use commonjs version (8ab1a44)
|
|
12
20
|
- fix: narrow vim call results (b72ad90)
|