GithubHelp home page GithubHelp logo

2kabhishek / co-author.nvim Goto Github PK

View Code? Open in Web Editor NEW
19.0 2.0 1.0 634 KB

Quickly add co-authors to commits ๐Ÿ’ป๐Ÿช„

License: GNU General Public License v3.0

Lua 100.00%
coauthor git neovim nvim pairing plugin utility vim

co-author.nvim's Introduction

License People Stars Forks Watches Last Updated

Quickly add co-authors to commits ๐Ÿ’ป๐Ÿช„

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 a :CoAuthor command that will show you the list of unique co authors who have already contributed to the current git repo.

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

co-author.nvim's People

Contributors

2kabhishek avatar sumanthyedoti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

sumanthyedoti

co-author.nvim's Issues

[BUG]: UI is different from the screenshot

Description of the bug

This is what I see:

Screenshot 2023-01-23 at 13 19 04

Steps To Reproduce

  1. git add .
  2. git commit
  3. : GitCoAuthors
  4. See the list in a terminal pager

Additional Information

Do I need a plug-in to make it look like the screenshot?

[BUG]: Error on Escape

Description of the bug

On hitting Escape when co-autor UI is open, got this error

Error executing vim.schedule lua callback: ...al/share/nvim/lazy/co-author.nvim/lua/co-author/init.lua:25: attempt to concatenate local 'item' (a nil value)
stack traceback:
        ...al/share/nvim/lazy/co-author.nvim/lua/co-author/init.lua:25: in function 'on_choice'
        ...are/nvim/lazy/dressing.nvim/lua/dressing/select/init.lua:78: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

Steps To Reproduce

Hit Escape with the plugin UI open

Additional Information

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.