tree-sitter-gitcommit
tree-sitter-gitcommit copied to clipboard
A tree-sitter grammar for gitcommit messages
tree-sitter-gitcommit
gitcommit grammar for tree-sitter.
Features
- Support for Conventional Commits specifications.
- Support for different locales / languages. See Supported locales for a full list.
Supported locales
We aim to support all the locales supported by git. The currently supported locales are listed below:
en: Englishbg: Bulgarianca: Catalande: Germanel: Greekes: Spanishfr: Frenchid: Indonesian (Bahasa)it: Italianko: Koreanpl: Polishpt_PT: Portugal Portugeseru: Russiansv: Swedishtr: Turkishvi: Vietnamesezh_CN: Chinese (Simplified)zh_TW: Taiwanese Mandarin
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).