Skip to content

Git author completion source for nvim-cmp to write `Co-authored-by` credits in commit messages.

Notifications You must be signed in to change notification settings

davidmh/cmp-git-co-authors

Repository files navigation

cmp-git-co-authors

Git author completion source for nvim-cmp to write Co-authored-by credits in commit messages.

demo.mov

Setup

require('cmp').setup {
  sources = {
    { name = 'git-co-authors' }
  }
}

Options

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.

About

Git author completion source for nvim-cmp to write `Co-authored-by` credits in commit messages.

Topics

Resources

Stars

Watchers

Forks

Languages