emacs-tree-sitter/tree-sitter-langs

OCaml highlights?

Opened this issue · 5 comments

I noticed that emacs-tree-sitter installs tree-sitter support for OCaml, but tree-sitter-langs doesn't contain a correponding highlights.scm file. Simply copying the one from tree-sitter/tree-sitter-ocaml seems to work well though, so -- has this simply not been requested so far, or or does the highlights.scm from tree-sitter-ocaml have some drawback(s) that I'm not aware of?

It hasn't been requested so far, and no one that uses OCaml has confirmed that the upstream query patterns are adequate.
If you have verified that, can you open a pull request for it? Thanks!

ok, sure!

currently I'm getting loads of No such file or directory (os error 2) errors when trying to build tree-sitter-langs via tree-sitter-langs-create-bundle. Got to leave now until the late evening, plan to have another look then (did install tree-sitter-cli, and did run cask install beforehand)

I finally had another go at this and noticed that the errors were caused by tree-sitter looking for tree-sitter-langs/config.json. Generating a dummy config via tree-sitter init-config and moving the generated config.json to that path "fixed" that error (in the sense of tree-sitter happily compiling grammars), but for some reason no .gz or .tar file would be created.
I then replaced tree-sitter 0.20.0 by 0.19.3 (which AFAICT seems to be what your CI setup uses?) and then everything went flawlessly. If <= 0.19.3 is a requirement, adding that info to your readme might help other newbies (or if it's already there, sorry for missing it).

Highlighting now seems to work fine, so I'll open my PR some time soon

I then replaced tree-sitter 0.20.0 by 0.19.3 (which AFAICT seems to be what your CI setup uses?) and then everything went flawlessly. If <= 0.19.3 is a requirement, adding that info to your readme might help other newbies (or if it's already there, sorry for missing it).

This was caused by this breaking change tree-sitter/tree-sitter#1157. I have updated docs to mention that CLI version 0.20+ cannot currently be used.