neogit icon indicating copy to clipboard operation
neogit copied to clipboard

Add Author Column to Recent Commits

Open alextricity25 opened this issue 2 years ago • 4 comments

Is your feature request related to a problem? Please describe. I find myself frequently wanting to see the author when viewing Recent commits, but most of the times I'm too lazy to press enter on the commit to inspect it's details.

Describe the solution you'd like I would like the author of the commit to also be included in Recent commits as a separate column so I can quickly see who authored the commit.

Describe alternatives you've considered Start exercising, change my diet, work on my relationships, all in a futile effort to overcome my laziness.

Additional context image

alextricity25 avatar Jul 20 '23 21:07 alextricity25

The place to embed that information is over here: https://github.com/NeogitOrg/neogit/blob/3d63d76f04dc7102c83a057ded30a93822b59dec/lua/neogit/lib/git/log.lua#L273

Or do some custom parsing for the commit in render_section, over here: https://github.com/NeogitOrg/neogit/blob/3d63d76f04dc7102c83a057ded30a93822b59dec/lua/neogit/status.lua#L193

Not sure what the best approach on that is. I'm guessing we'd want to set recent commit formatting based on a config flag.

PriceHiller avatar Jul 20 '23 22:07 PriceHiller

I have it working on this branch. ~No flags to opt in or out,~ but this is how it looks:

image

Neogit has to be setup with the option recent_commit_include_author_info = true like so:

require("neogit").setup({
  status = {
    recent_commit_include_author_info = true
  }
})

PriceHiller avatar Jul 21 '23 00:07 PriceHiller

@treatybreaker you're an absolute legend. If you PR this i'll be more than happy to review and approve. image

alextricity25 avatar Jul 21 '23 00:07 alextricity25

Yep, definitely going to PR. Writing some tests for it currently 😎.

PriceHiller avatar Jul 21 '23 00:07 PriceHiller