Installing built grammars
0x4d6165 opened this issue · 6 comments
Hi. I'm a little unclear on what to do with the grammars after they're built? Unless I'm reading them wrong the documentation doesn't say how to install them so that tree-sitter CLI and emacs understand it, just how to build them.
You don't have to build the grammars yourself, you just have to require this package. If you are using use-package
, you should just be able to do
(use-package tree-sitter-langs
:ensure t
:after tree-sitter)
Still getting the error
Warning (treesit): Cannot activate tree-sitter, because language grammar for bash is unavailable (not-found): (libtree-sitter-bash libtree-sitter-bash.so) No such file or directory
I am using emacs-29 branch though.
We don't have compatibility with builtin treesit package which is what it looks like you are trying to use. This repo only works with https://github.com/emacs-tree-sitter/elisp-tree-sitter as of now. There is some discussion about supporting builtin treesit which you can follow at #157
You can find more info about installing grammars for builtin tree-sitter at https://archive.casouri.cc/note/2023/tree-sitter-starter-guide/#Install%20language%20definitions .
Here are a few other links to help you with built in tree-sitter:
Ohhhh I see! I didn't realize they were separate packages. Thank you for clarifying.