emacs-tree-sitter / treesit-langs

Language bundle for Emacs's treesit.el
GNU General Public License v3.0
7 stars 2 forks source link

Relationship to kiennq/treesit-langs #3

Open FrauH0lle opened 1 week ago

FrauH0lle commented 1 week ago

Hey there

I was looking into using the builtin treesit functionalities from Emacs 29+ and looked through available packages and how they work.

During my search I stumbled across this repository but also found https://github.com/kiennq/treesit-langs. @kiennq 's fork seems to be older and besides makeing the tree-sitter libraries available to Emacs, it also provides a parser for the *.scm files and a highlighting minor mode similar to the elisp-tree-sitter package. However, the highlighting files are also different from the ones in tree-sitter-langs (at least in part, e.g. for Python).

Are there any plans to merge the work? From a user perspective it would be great to have a central place for tree-sitter packages.

jcs090218 commented 1 week ago

This repo is designed to work with the built-in Tree-sitter module, treesit.el. AFAIK treesit.el has the built-in highlighting functionality; therefore, unlike tree-sitter.el, you don't need the *.scm files. This package removed everything and only provided the pre-built binaries, which will be installed in the correct location.

kiennq commented 1 week ago

The kiennq/treesit-langs serves different purposes, it

jcs090218 commented 1 week ago

intends to work with the Emacs's built-in tree-sitter

I didn't know it intended to work with the built-in tree-sitter. That's awesome! :D

FrauH0lle commented 3 days ago

Thanks a lot @jcs090218 and @kiennq for your replies.

and provides the tree-sitter highlighting ability for non-tree-sitter major modes This is a huge advantage helps a lot with major modes like ESS R which do not provide a new tree-sitter major mode yet.

Together with being able to change the highlighting via .scm files I would say that kiennq's package is basically a drop-in replacement for elisp-tree-sitter for Emacs 29+.

Only "issue" I have been facing is that the highlighting varies between the different implementations, e.g. using elisp-tree-sitter python_tree-sitter using treesit-langs python_treesit-langs and using python-ts-mode with treesit-font-lock-level = 4 python_treesit

But anyways, I wanted to know if the two projects are aware of each other and my question has been answered. Thanks a lot again!