Open goto1134 opened 1 year ago
that's amazing, thank you @goto1134 🙌
Github's cut the release and it works now!
Out of curiousity, @goto1134 do you know anything about how linguist works with markdown files? https://github.com/terrastruct/d2/issues/1426 . nvm, was just cache not updating!
i wonder why the syntax color isn't using ours though. i wonder if https://github.com/github-linguist/linguist/discussions/5572#discussioncomment-1355712 is still true and we need to include a tree-sitter implementation in there
edit: or maybe it's not possible. all the samples in there have the same color scheme
According to the docs, the TextMate grammar is enough to get the job done. Probably, tree-sitter is mentioned in https://github.com/github-linguist/linguist/discussions/5572#discussioncomment-1355712 to address the issue with Python syntax.
@alixander , here is an answer to your question: https://github.com/github-linguist/linguist/discussions/5204#discussioncomment-352539
Linguist doesn't assign the colours. This is entirely controlled by the stylesheet at https://github.com/primer/github-syntax-light (Lightshow uses this one) and https://github.com/primer/github-syntax-dark based on the grammar scopes applied by the grammar.
Here is a summary of the scopes and their colors: https://github.com/Alhadis/language-etc/blob/master/samples/lists/scope-previews.nanorc
So I believe, to solve the problem, we need to change the scopes in the grammar.
ah i see, thank you for looking into that. the predefined list of colors still doesn't have the ones from D2's theme. Oh well, no big deal =)
Thank for all
i wonder why the syntax color isn't using ours though. i wonder if https://github.com/github-linguist/linguist/discussions/5572#discussioncomment-1355712 is still true and we need to include a tree-sitter implementation in there
edit: or maybe it's not possible. all the samples in there have the same color scheme
I will try to work for it.
Can some teach the blue verified?
Since https://github.com/github-linguist/linguist/pull/6435 is merged, the github linguist now supports D2 code detection and code highlighting. This means that d2 will be present in the languages widget and syntax will be highlighted on github.com: .
Maybe, you want to mention that in your README.
Congratulations, and thank you for your work!