Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • About Bonfire
Bozhidar Batsov (a.k.a. Bug)
Bozhidar Batsov (a.k.a. Bug)
@bbatsov@hachyderm.io  ·  activity timestamp 3 hours ago

I've converted some random dev notes I had lying around from working on clojure-ts-mode, neocaml and asciidoc-mode to a blog post with some general advice for building #Emacs major modes powered by #TreeSitter https://batsov.com/articles/2026/02/27/building-emacs-major-modes-with-treesitter-lessons-learned/

I hope some of you will find it useful! I certainly wish someone had written such an article a year ago when I started to get more serious about playing with TreeSitter.

#Clojure #OCaml #AsciiDoc

(think)

Building Emacs Major Modes with TreeSitter: Lessons Learned

Over the past year I’ve been spending a lot of time building TreeSitter-powered major modes for Emacs – clojure-ts-mode (as co-maintainer), neocaml (from scratch), and asciidoc-mode (also from scratch). Between the three projects I’ve accumulated enough battle scars to write about the experience. This post distills the key lessons for anyone thinking about writing a TreeSitter-based major mode, or curious about what it’s actually like.
  • Copy link
  • Flag this post
  • Block

BT Free Social

BT Free is a non-profit organization founded by @ozoned@btfree.social . It's goal is for digital privacy rights, advocacy and consulting. This goal will be attained by hosting open platforms to allow others to seamlessly join the Fediverse on moderated instances or by helping others join the Fediverse.

BT Free Social: About · Code of conduct · Privacy ·
Bonfire social · 1.0.2-alpha.34 no JS en
Automatic federation enabled
Log in
Instance logo
  • Explore
  • About
  • Code of Conduct