helix-editor / helix

A post-modern modal text editor.
https://helix-editor.com
Mozilla Public License 2.0
33.35k stars 2.47k forks source link

Support Git merge commit message “language” #11840

Open jakubkaczor opened 1 week ago

jakubkaczor commented 1 week ago

Git merge commit messages have no highlighting. This can be verified with

cd $(mktemp -d)
git init hx-msg-test
cd hx-msg-test/
touch test
git add test 
git commit --message 'Ok'
git switch --create test
touch test2
git add test2
git commit --message 'Ok'
git switch main
git merge test --commit  # No highlighting

I took a look, and it appears Git merge commit messages are unsupported as a language. That is, there are no queries in runtime/queries and no entries in languages.toml that correspond to them.

the-mikedavis commented 1 week ago

We might just need to add .git/MERGE_MSG to the git commit language's file-types unless the syntax is different for a merge commit