gitui icon indicating copy to clipboard operation
gitui copied to clipboard

Add syntax highlighting options for commit titles inside the log view

Open alerque opened this issue 2 years ago • 3 comments

I would like some more visual clues while scanning a log view as to what is important or not or might be related to the thing I'm looking for. My projects mostly follow the conventional commits guidelines, so they have lots of easy to parse information that could be used for this. Commits are categorized as to whether they are feature additions, bug fixes, refactors, documentation, etc. Also they show the scope of the commit.

I would like some sort of syntax highlighting / formatting for commit titles that took this info into account. For example:

  • Use different highlight colors for the titles of different types of commits (red for bugs, blue for docs, light grey for style changes, etc.).
  • Perhaps hide the commit type entirely in favor of just the color scheme.
  • Add alignment so the actual commit titles line up as another column after the type and scope info.

I may be able to work on this some if such a feature set would be acceptable. Presumably this would just involve some sort of filter widget used when outputting message that adds either conventional commit specific or generic pattern matching of some kind.

alerque avatar Jan 16 '24 09:01 alerque

do you have a reference in another tools that does this? tig, lazygit?

extrawurst avatar Feb 19 '24 11:02 extrawurst

No. I've seen something similar (for a different purpose) in a GUI, but never a terminal. I'll try to track that down, or perhaps a POC mockup would help.

alerque avatar Feb 21 '24 13:02 alerque

definitely any reference project helps: ideally in terminal but also regular GUI would help

extrawurst avatar Feb 21 '24 13:02 extrawurst