# ANN: tree-sitter grammar for Motoko

**URL:** <https://forum.dfinity.org/t/ann-tree-sitter-grammar-for-motoko/45649>\
**Category:** Motoko\
**Created:** [April 30, 2025, 1:47pm UTC](https://forum.dfinity.org/t/ann-tree-sitter-grammar-for-motoko/45649 "2025-04-30T13:47:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kritzcreek](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/kritzcreek/32/267_2.png) [@kritzcreek](https://forum.dfinity.org/u/kritzcreek)\
**Post date:** [April 30, 2025, 1:47pm UTC](https://forum.dfinity.org/t/ann-tree-sitter-grammar-for-motoko/45649/1 "2025-04-30T13:47:20Z")

</div>

I implemented a new tree-sitter grammar for Motoko at [GitHub - christoph-dfinity/tree-sitter-motoko: tree-sitter grammar for Motoko](https://github.com/christoph-dfinity/tree-sitter-motoko)

I’m currently using it to get [parser directed syntax highlighting and indentation support for Emacs](https://github.com/dfinity/motoko/blob/206251aa835f0d4cc3afc0b410a435097e3375a4/emacs/motoko-ts-mode.el), but it should work just as well for Nvim, Zed, …

/cc @wiyota you might be interested in this for your Zed editor extension

---

<div class="post-metadata">

**Author:** ![wiyota](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/wiyota/32/27664_2.png) [@wiyota](https://forum.dfinity.org/u/wiyota)\
**Post date:** [April 30, 2025, 2:47pm UTC](https://forum.dfinity.org/t/ann-tree-sitter-grammar-for-motoko/45649/2 "2025-04-30T14:47:00Z")

</div>

That’s wonderful!!!  
Currently, I’m using the community-provided tree-sitter-motoko locally, and I was planning to customize it myself as needed.  
If it’s being provided by the Motoko developers, then I have nothing more to ask for.  
Thank you for the quick release 💝
