Open timcharper opened 7 months ago
tree-sitter-langs
and the built-in treesit
are different thing. For the built-in tree-sit
to work with binaries from tree-sitter-langs, you will need to add that path to treesit-extra-load-path
. Also, the tree-sitter parsers have to be named in the format of libtree-sitter-<lang>.<ext>
I'm not a tree-sitter pro by any means. I've noticed that grammar is in version "0.12.86" of tree-sitter-langs, however, when I tried to load it, even though (tree-sitter-require 'mermaid) returned
t
,(treesit-ready-p 'mermaid)
still returned nil.However, what did work was this:
(customize and set variable tree-sitter-langs-git-dir to
~/.emacs.d/tree-sitter/grammars/
)M-x treesit-install-language-grammar "mermaid"
Then,
(treesit-ready-p 'mermaid)
returned true.I'm not entirely sure why the version in tree-sitter-langs was insufficient, but I thought this would be at least an interesting thing to raise, and perhaps a good note for the README?