> > Yes, why not? > >> I'll just put it behind a "js-mode-use-treesit-p" defcustom or something like that? > > Something like that, yes. Ok, see the attached patch. This makes the normal js-mode support tree sitter. Some caveats. 1. You need to install the tree sitter parser. Use Yuans tree-sitter-module [1] project for this 2. Put the javascript grammar inside ~/.emacs.d/tree-sitter/ 3. That should be it. 4. No wait, you need to set 'js-use-treesit-p' to 't' for this to work :) This should yield decent indentation and syntax highlighting, and should be sufficient for daily usage, I believe. There are surely many things that can improve, such as the navigation. Now we only support beginning-of-defun when inside of functions, but this is easily extendible. However, I'm not completely sold on the best way to deal with that. Suggestions welcome here. Anyways. Please try it out and report what you think. This is just a quick "look how easy it is to implement things using tree sitter", but I think it is a good starting point. All the best, Theodor Thornhill