Emacs treesitter is able handle several modes so
do we want automagicly switch to markdown (treesitter) mode in documentation parts?
Then it needs to be implemented.
Convert the old erlang-mode functionality to be in the new erlang-ts-mode so we can phase out
the old mode completely.
I’ve done some reading about the whole tree-sitter thing, and it left me more confused than excited so far.
Tree-sitter grammars are implemented as 3rd party native libraries created from obfuscated autogenerated c code: https://github.com/WhatsApp/tree-sitter-erlang/blob/main/src/parser.c (55kLOC) I’m pretty sure nobody reviews this generated code. Call me paranoid, but it is a perfect spot for a supply-chain attack.
Nothing really works without these *.so files (Emacs “NIFs”, if you will). They should be provided by the distro (mine doesn’t happen to have a package for erlang at the moment) or downloaded from melpa. tree-sitter-langs package on melpa has the binaries, but they are incompatible with my distro. D’oh.
Ok, no problem, if there’s no package, I can contribute it myself. But if I want to to be a diligent maintainer of tree-sitter-erlang package for my distro, and I decide to verify the generated parser.c, I need a tool written in Rust, which itself requires a massive toolchain. Complexity just snowballs.
Compared to the dependency-free pure elisp solution that “just works”, I’m not sure if the cost/benefit adds up. Maybe I misunderstood everything, though. I may take another stab at this later, but first look at the tree-sitter infra gives off slight “X rewritten in Rust!” vibe. Sorry for the downer.