Closed ianyepan closed 3 years ago
New languages can be added in the tree-sitter-langs. There you can find also an explanation on how to add languages: https://github.com/ubolonton/tree-sitter-langs (there is even a PR for mhtml.
Regarding Emacs Lisp, I've created a Common Lisp grammar https://github.com/theHamsta/tree-sitter-commonlisp based on https://github.com/sogaiu/tree-sitter-clojure. You might be able to either adapt the Common Lisp grammar or use sogaiu's clojure or Janet grammar as a starting point to create a parser that could be added to tree-sitter-langs.
It seems like the question was answered
As titled, how can we add new languages/Emacs modes to tree-sitter? For instance, Emacs Lisp, or mhtml-mode, which is the default major mode for HTML files.