Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(render): dim housekeeping commits by default #612

Merged
merged 2 commits into from
Mar 2, 2023

Conversation

kylo252
Copy link
Contributor

@kylo252 kylo252 commented Mar 2, 2023

use LazyComment highlight group for commits with housekeeping types, i.e. chore/ci/doc

Inspired by refined-github

Log view

image

use `LazyComment` highlight group for commits with
housekeeping types, i.e. chore/ci/doc
@kylo252
Copy link
Contributor Author

kylo252 commented Mar 2, 2023

@folke, this is just a minimal example implementation that can definitely be improved

@folke
Copy link
Owner

folke commented Mar 2, 2023

I like it! I just pushed some small improvements. Let me know what you think!

image

@kylo252 kylo252 marked this pull request as ready for review March 2, 2023 13:22
@kylo252
Copy link
Contributor Author

kylo252 commented Mar 2, 2023

I like it! I just pushed some small improvements. Let me know what you think!

Perfect! I've been thinking it would be great to add a new hl group for this, but wasn't sure how to handle the fallback.

@folke folke merged commit 1f7ffec into folke:main Mar 2, 2023
@folke
Copy link
Owner

folke commented Mar 2, 2023

Merged. Thank you!

@kylo252
Copy link
Contributor Author

kylo252 commented Mar 2, 2023

@folke, some future improvements to consider

  • make the list of dimmed words configurable
  • add the ability to group such commits and fold them
  • add the ability to skip showing these commits altogether (alter git log sub-command)

the last two will be tricky when the log only contains such commits

@folke
Copy link
Owner

folke commented Mar 2, 2023

For your first point, people can already do that by changing those values in the view config module.

I keep all ui related stuff in there that i don't think should be easily configurable, but can be if users want to. Keymaps etc are in there as well

@briandipalma
Copy link

add the ability to group such commits and fold them

I wouldn't reorder commits. It's handy to see what changes there are in different plugins by jumping onto the repo site and scrolling through the commits, starting from the first change. If you reorder you don't know for sure which is the first change.

@kylo252 kylo252 deleted the dimmed-commits branch March 8, 2023 09:31
@kylo252
Copy link
Contributor Author

kylo252 commented Mar 8, 2023

If you reorder you don't know for sure which is the first change.

you still have the timestamps.

I was mostly thinking of categorizing the commits within each block, e.g. similar to https://github.com/orhun/git-cliff

@canvanaut
Copy link

Hi, is it possible to only dim commits that aren't breaking (e.g. chore: foo is dimmed, but chore!: foo is not)

@kylo252
Copy link
Contributor Author

kylo252 commented Mar 15, 2023

Hi, is it possible to only dim commits that aren't breaking (e.g. chore: foo is dimmed, but chore!: foo is not)

@canvanaut, it should be doable, but the question is should we actually encourage this behavior in the first place? why introduce a breaking change in a "chore" commit in the first place? 🤔

@canvanaut
Copy link

Oh I just used that as an example, but I've seen plenty of refactor!: foo, which doesn't get highlighted since I've made regular refactor: foo dimmed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants