https://github.com/davidmh/cmp-git-co-authors
Git author completion source for nvim-cmp to write `Co-authored-by` credits in commit messages.
https://github.com/davidmh/cmp-git-co-authors
cmp co-authored-by fennel git-commit-messages lua neovim nfnl
Last synced: 4 months ago
JSON representation
Git author completion source for nvim-cmp to write `Co-authored-by` credits in commit messages.
- Host: GitHub
- URL: https://github.com/davidmh/cmp-git-co-authors
- Owner: davidmh
- Created: 2024-04-08T03:58:12.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-08T06:15:24.000Z (about 1 year ago)
- Last Synced: 2025-03-06T05:08:37.985Z (4 months ago)
- Topics: cmp, co-authored-by, fennel, git-commit-messages, lua, neovim, nfnl
- Language: Fennel
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cmp-git-co-authors
Git author completion source for [nvim-cmp] to write `Co-authored-by` credits in commit messages.
https://github.com/davidmh/cmp-git-co-authors/assets/594302/0b7439ec-556a-4b27-883c-c3a2b0d58013
## Setup
```lua
require('cmp').setup {
sources = {
{ name = 'git-co-authors' }
}
}
```## Options
```lua
require('cmp').setup {
sources = {
{
name = 'git-co-authors',
option = {
domain_ranking = {
['my-domain.com'] = 1,
['users.noreply.github.com'] = 2
}
}
}
}
}
```All keys are optional
| option key | default value | description |
| --- | --- | --- |
| domain_ranking | `{['users.noreply.github.com'] = 1}` | A lookup table to decide which email to pick, if an author has commited with multiple emails. Smaller takes priority. |
| since_date | `'6 months'` | A range limit to use while looking for git authors through the log. |[nvim-cmp]: https://github.com/hrsh7th/nvim-cmp
[lazy.nvim]: https://github.com/folke/lazy.nvim