nvarner / typst-lsp

[Deprecated] An early language server for Typst, plus a VS Code extension
MIT License
1.21k stars 78 forks source link

Port some changes from the linguist pull request? #256

Open ice1000 opened 1 year ago

ice1000 commented 1 year ago

I saw https://github.com/michidk/typst-grammar/commit/4221511bb563b71e66c52cc529fbebe57bdb53d9 from https://github.com/github-linguist/linguist/pull/6379 which attempts to add Typst to GitHub linguist, and they author claimed that

So the original grammar from https://github.com/nvarner/typst-lsp had the following errors: ... I now made a fork (https://github.com/michidk/typst-grammar) that has the required structure and fixes the issues. The script runs and completes now without errors:

Maybe we can port that patch to this repo (should be very easy, just apply the diff)

michidk commented 1 year ago

Keep in mind that my fork is probably very outdated by now. But I agree, it would be great if we could have an LSP definition compatible with GitHub's linguist. Then I could delete my repository and adjust my PR to use this one.

Btw the list of incompatibilities can be found here: https://github.com/github-linguist/linguist/pull/6379#issuecomment-1512862673

nvarner commented 1 year ago

The TextMate grammar in this repo is unused and unmaintained. We switched to semantic token highlighting because it's based on the Typst parser, so we don't need to keep up with changes to the language's grammar. I'd be willing to patch in the changes, but I can't commit to keeping it up to date.