-
-
Notifications
You must be signed in to change notification settings - Fork 793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide grammars and LSP #118
Comments
I'm working on number 2. |
TextMate grammar can be found here. |
Also supported by Emacs, Helix, and a couple of other editors :) |
Development of a Typst LSP (3.) seems to have been started over at nvarner/typst-lsp |
Just found that typst.app compiles files locally. Does this mean we can have a VS Code extension that not only
And if it's true, I finally can use github.dev to write my paper without downloading anything, and collaborate with others. That is fantastic. |
We've got an LSP at nvarner/typst-lsp and an (admittedly a bit outdated) TextMate grammar here. @SeniorMars can you share a link to your WIP Tree Sitter grammar? Once we collected that here, we'll close this issue, any further issues shall be filed on the respective projects. |
There's also @frozolotl's grammar here: https://github.com/frozolotl/tree-sitter-typst |
@reknih, the tree-sitter grammar from @SeniorMars can be found here: https://github.com/SeniorMars/tree-sitter-typst |
As there are multiple grammars and a third-party LSP, I'm going to close this. |
Are there plans on blessing some solutions as official-ish (while keeping them community-maintained)? Right now there’s a naming problem: for example, nixpkgs currently includes |
I think its a little early for that, but I can imagine that in the medium term. Also depends on what the maintainers of these projects want and plan. |
I agree. While my grammar right now has more stars - it is nowhere complete, I think we should wait until they become feature-proof. |
I am writing a TreeSitter grammar that took me several months to come by, yet, it is not finished. Nonetheless, it seems more advanced than the two evoked earlier, as it parses correctly more tricky cases. https://github.com/uben0/tree-sitter-typst As mentioned in the README, two issues remain, and I need help resolving them. I am looking at you @SeniorMars 👀 Sincerely, it seems like the TreeSitter tool is not meant for that kind of language. It feels like this idea of having optional Difficult cases:
|
It seems the repository is set to private.
This one should be solved by providing
In my grammar, I haven't implemented binary operators yet, but I believe this should just be a case of only allowing trivia that isn't a newline. For instance, here I differ between trivia that allow newlines and those that do not. |
@frozolotl Thanks for the feedback! I'll test the possible fixes and keep this response updated. By the way, (source_file
(ident)
(text)
(emphasis
(text))) |
@frozolotl Can I use parts of your code in the grammar I am writing ? I'm thinking about the regex for XID_Continue without |
You are allowed to use all the code in frozolotl/tree-sitter-typst under the conditions given in the LICENSE. I would prefer that we kept this conversation and other ones not related to this issue somewhere else, though. So, if you have any further questions or want to discuss my tree-sitter grammar, you should do that there. Alternatively, you can contact me via email, via matrix, or on discord ( |
As far as I understand, there’s currently no support for editors other than typst.app. Some things that could improve this situation:
The text was updated successfully, but these errors were encountered: