#conventional-commits #parser #incremental #gitcommit

tree-sitter-gitcommit

gitcommit grammar for the tree-sitter parsing library

4 releases

0.3.3 May 30, 2023
0.3.2 May 15, 2023
0.3.1 Apr 18, 2023
0.3.0 Apr 18, 2023
0.0.1 Apr 11, 2023

#180 in Text editors

Download history 16/week @ 2024-02-22 6/week @ 2024-02-29 13/week @ 2024-03-28 6/week @ 2024-04-04 73/week @ 2024-04-11 4/week @ 2024-04-18

96 downloads per month

MIT license

2.5MB
69K SLoC

C 68K SLoC JavaScript 496 SLoC Rust 36 SLoC // 0.3% comments Scheme 33 SLoC

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:

  • en: English
  • bg: Bulgarian
  • ca: Catalan
  • de: German
  • el: Greek
  • es: Spanish
  • fr: French
  • id: Indonesian (Bahasa)
  • it: Italian
  • ko: Korean
  • pl: Polish
  • pt_PT: Portugal Portugese
  • ru: Russian
  • sv: Swedish
  • tr: Turkish
  • vi: Vietnamese
  • zh_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).

Credits

Dependencies

~2.7–4MB
~71K SLoC