emacs-tree-sitter / tree-sitter-langs

Language bundle for Emacs's tree-sitter package
https://emacs-tree-sitter.github.io/languages/
MIT License
239 stars 129 forks source link

Request bump to Typst library #633

Open Remillard opened 1 month ago

Remillard commented 1 month ago

I think the precompiled Typst library is lagging behind the source in uben0/tree-sitter-typst/ as if I'm reading it correctly, it's pointed at a commit from 8 months ago. Typst 0.11.1 is out now and there was several updates to the language, so the more recent variation is required for using it with typst-ts-mode and Emacs. Thanks!

Remillard commented 3 weeks ago

Noticed that releases updated but Typst was still set to its submodule pointer of 8 months ago. Poked into the branch for bumping it and it seems like it's failing a continuous integration test. Most of the OS's builds failed due to timeout, but the Windows one failed due to the following:

Submodule 'repos/typst' (https://github.com/uben0/tree-sitter-typst) registered for path 'repos/typst'
Cloning into 'D:/a/tree-sitter-langs/tree-sitter-langs/repos/typst'...
Submodule path 'repos/typst': checked out '3924cb9ed9e0e62ce7df9c4fe0faa4c234795999'
  fixme:
    ✗ fixme/011
  negative:
Error: The operation was canceled.

I don't know exactly how the chore scripting works, but I did clone the tree-sitter-typst repo and grepped for fixme, and I don't think it's in that at least as far as I can tell. Is the fixme in the scripting? It's possible that this has kept Typst from getting updated for 8 months which is a shame (and also now critical because they added a new keyword in 0.11 that makes typst-ts-mode fail to work. Anyhow, maybe this can be looked into.

jcs090218 commented 3 weeks ago

There are errors; therefore, they cannot be merged. See https://github.com/emacs-tree-sitter/tree-sitter-langs/pull/365.

Remillard commented 3 weeks ago

Understandable. I cloned the repo and built locally to get typst-ts-mode to work. Maybe if I get an understanding of how the grammar works, I can help with the errors.

jcs090218 commented 3 weeks ago

Are you sure you use the tree-sitter.el or treesit.el? 🤔 There are currently two Tree-sitter implementations in the Emacs community. Anything with *-ts-mode is from treesit.el and not tree-sitter.el (this repo).

Remillard commented 3 weeks ago

I'm using whatever is built-in to Emacs 29. I've never externally required a tree-sitter package. Like I said, I was able to get the basic stuff working with locally building the library. I don't wholly understand tree-sitter grammar description. The method taken by uben0 and the taken by frozolotl are quite different, though the uben0 might be somewhat more straightforward and debuggable if I have enough time to spend on it.

This repository is recommended by Mickey Petersen in his articles discussing tree-sitter (though now that I've figured out how to build a library, I can probably do it to any of them) and meow_king's typst-ts-mode specifically targets the uben0 repository.