Emacs 29+ will have optional tree-sitter support out of the box. A lot of modes are reimplemented to use a dedicated shared library for faster parsing and other features. E.g. elixir-ts-mode
vs elixir-mode
. This might not be as beneficial for Fennel, because s-expressions are easier to parse, but we might be able to implement some highlighting features, such as highlighting where
only in case
or match
, and other things like that, without sacrificing performance or writing convoluted regular expressions. In addition to that, Emacs 30+ sets forward-sexp to a tree sitter-backed function, thus making it possible to create a universal structural editing interface. While again, not a problem for s-expression-based language, obliging to a universal interface may be more future-proof.
You can assign me to that unless there's anyone else who wants to do this before I get to it.
We already have a grammar: https://github.com/TravonteD/tree-sitter-fennel but it might need some adjustments down the line.
It sounds like if someone is already working on this in a 3rd-party repo it's better to track this there.