I frequently source the body of my GitHub PRs from my commits, and thus is makes sense to consider my commits to be made in Markdown (it is nice to have a markup language for commits anyway). Thus I customized Magit's
git-commit-major-mode to be
markdown-mode, but then all the
# comment lines that Git inserts get formatted like markdown headers---highly undesirable! So I switched away from
# as Git's comment delimiter. Somewhat randomly, I picked
!, and added to my
[core] commentChar = !
This keeps them from being formatted like headers, but I previously enjoyed the way that Magit had some understanding of these lines and would syntax-highlight them. I was hoping that there was some intelligence in the Git commit mode that would be able to mesh markdown mode with the original abilities of Magit, so that above the comment lines would be highlighted with Markdown, and the comment lines themselves would be highlighted by Magit (which is already aware of
core.commentChar, because when I set commit buffers to have no major mode, it properly highlights the comments that use
My current configuration is usable, but with Emacs (and Magit especially) I always shoot for the stars. How do I achieve this?