Skip to content

2KAbhishek/co-author.nvim

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
doc
 
 
 
 
 
 
 
 
 
 
 
 
 
 

co-author.nvim

License People Stars Forks Watches Last Updated

Add commit authors from nvim πŸ’»πŸͺ„

co-author.nvim Demo
co-author.nvim screenshot

What is this

How many times have you been pairing on a feature and then when committing you had to manually paste their details for adding a Co-author to the commit?

This plugin automatically fetches author details from the repo's commit history and then adds it to your commit message.

It shows you a list of all the unique authors in your current repo on a nice fuzzy searchable list.

co-author.nvim automatically works with telescope and presents the list in a nice fuzzy searchable UI.

Here's a demo video for a quick walkthrough.

Inspiration

Noticed something similar on a co-workers using IntelliJ, and I wanted it!

Prerequisites

Before you begin, ensure you have met the following requirements:

  • You have installed the latest version of neovim

These two plugins are optional but highly recommended for a smoother user experience.

Installing co-author.nvim

To get co-author.nvim, add the following to your plugin list:

-- Lazy
{
    '2kabhishek/co-author.nvim',
    dependencies = {
        'stevearc/dressing.nvim',
        'nvim-telescope/telescope.nvim',
    },
    cmd = {'CoAuthor'},
},

-- Packer
use '2kabhishek/co-author.nvim'

Using co-author.nvim

co-author.nvim adds two new commands :CoAuthor, and a legacy alias :GitCoAuthors.

You can add your custom bindings for the command :CoAuthor, the recommended keybinding is <leader>gC.

check :help co-author for more details.

NOTE: By default there are no configured keybindings.

How it was built

co-author.nvim was built using neovim, lua

Challenges faced

Figuring out vim's rtp was tricky initially.

What I learned

  • Learned about nvim plugin ecosystem
  • Explored vim APIs

What's next

You tell me!

Hit the ⭐ button if you found this useful.

More Info

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages