Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is another attempt at adding author (and date) information to recent commits in the status buffer, following #653.
What currently works:
I tried to follow Magit's default behavior as closely as I could. For the ISO-like date, I added a field to
lib/git/log.lua
to retrieve the commited date as a UNIX timestamp, which was then rendered in the local timezone. I think that should be fine, but if that introduces peformance concerns, or if there is a cleverer way to do this, I'm happy to change this.What doesn't work yet
Pretty much all of the other features. Most notably:
I wanted to put this out here for preliminary feedback, but I still need to write some tests before this is ready to merge. After that, I'm happy to work on the missing features, be that before or after merging this initial implementation (maybe after, judging by the discussion in #653?).
A question
I used popup actions to implement the three features above. This was the closest Neogit correlate I found to mimick Magit, but I'm wondering if I have this right.
I think what's tripping me up is that these features seem more like switches than actions proper (for instance, these "actions" don't spawn any new buffers or popups), so mayble internal switches would be better here. Actions also seem to always close the popup, whereas the margin popup stays open in Magit (though we may also opt not to follow Magit's behavior). I may be overthinking this, but it was something I thought I should check anyway.
Happy to hear any thoughts on this; this the first time I've worked on a Neovim plugin, so any feedback is much appeciated!