emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Adding git-commit highlight mode?


From: Konstantin Kharlamov
Subject: Adding git-commit highlight mode?
Date: Thu, 02 Jan 2025 21:30:53 +0300
User-agent: Evolution 3.54.2

Hi, just wanted to ask this before potentially taking on the initiative
to only find the code will get rejected.

I think a ballpark estimate of 90% of Git usage among CVSes in the
modern world is fair to assume.

But Emacs seems to be the only widely popular editor that still doesn't
provide OOTB at least syntax highlight for git-commit format. So, does
anyone have opposition to adding a major mode that would be bound to
filenames like `COMMIT_EDITMSG` and others, and would provide the
aforementioned highlight?

If there's no opposition, I could write such mode (it seems to be a
simple one), but I don't promise anything because Idk how long this
discussion will go and what's gonna happen tomorrow, etc… I just had
some spare time and motivation today, so decided to at least start the
discussion.

I don't have plans for adding complicated features besides just syntax
highlight. I think if anyone wishes they could be added later. And
indentation support from text-mode I think should be fine.

P.S.: to answer potential question "why not magit" — first it's not
OOTB experience. Second (but kinda related) it's a huge separate
package which takes off some startup time (and as of writing the words
commit highlight specifically doesn't work if you defer the load¹), but
not everyone needs full git-interaction suite in Emacs. Magit is great,
but I personally just grown over the years a bunch of zsh functions and
aliases that automate my Git workflow as much as possible, so I don't
think there's much to optimize still. I just want the highlight 😊 And
I think, having it in Emacs would benefit the wider community too.

1:
https://emacs.stackexchange.com/questions/82842/deferring-magit-load-without-breaking-highlight-in-git-commit



reply via email to

[Prev in Thread] Current Thread [Next in Thread]