gbprod / tree-sitter-gitcommit

A tree-sitter grammar for gitcommit messages
Do What The F*ck You Want To Public License
62 stars 8 forks source link
git gitcommit grammar tree-sitter tree-sitter-parser

tree-sitter-gitcommit

Build/test

gitcommit grammar for tree-sitter.

Features

Supported locales

We aim to support all the locales supported by git. The currently supported locales are listed below:

Note about injected languages

This parser only parses git commit subject, message and generated comments, it doesn't handle diff and git rebase information that could be included. To handle that, you must have diff and git_rebase tree-sitter grammars installed and add injection queries.

If you're using Neovim and nvim-treesitter, you just have to be sure that diff and git_rebase are installed (using TSInstall diff git_rebase for example).

Upgrade translations

There is python script to upgrade translations from git source code. It will search for all translations in all tagged versions of git from the v2.30.2. So this parser should be compatible with all git versions from v2.30.2.

To upgrade translations, run:

python parse-lang.py

Credits