-
Notifications
You must be signed in to change notification settings - Fork 12
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
Syntax highlighting on GitHub broken #47
Comments
🤔 I hadn’t heard of Linguist until you mentioned it, and having skimmed its README it isn’t clear to me that linguist does do syntax highlighting for GitHub—it sounds like it is simply a tool for detecting the programming language present in a file. If you’re sure the reason it depends on this project, though, is for syntax highlighting, I’ll take your word for it! The primary purpose for this project is to provide support for the Elm language to Sublime Text 3 or later (with previous versions supported by a legacy branch). Because Sublime Text 3 supports a superior language syntax file format than the old TextMate .tmLanguage files, we have migrated to this new format in this project. I suspect GitHub requires the old .tmLanguage file, which is no longer present in this project. GitHub could probably adjust its submodule reference to point to the st2-0.19.0 tag, which would make the .tmLanguage file available again. It’s probably fine for GitHub to depend on this legacy branch for the time being. When Elm next introduces significant syntax changes, though, someone will need to go back and update that branch to keep Linguist compatible with new versions of Elm. Does this sound doable, @zwilias? |
Yeah, Linguist essentially does both - language recognition using a built in set of rules, and based on the recognised language, highlighting using a bunch of vendored grammars. Cool, the switch to ST3's new syntax format would indeed explain this. I'm wondering about the best next course of action. Ultimately, having a supported TextMate bundle would be best (for as long as GitHub uses that for highlighting), though I wouldn't wish that extra maintenance cost on anyone. Perhaps it would be best to create a separate repo for a "legacy" tmLanguage definition, so at least the maintenance doesn't become your responsibility by default. CC/ @eeue56 do you have any thoughts on this? |
@zwilias I think you should open an issue like this: github-linguist/linguist#4004 and discuss there. It might be a similar issue, in which case I would prefer us to maintain a single source of truth for syntax highlighting for Elm. If ST3 syntax highlighting isn't supported by linguist, we should indeed make a separate repo. I don't see anything the linguist repo explicitly stating that they require |
I'm gonna put a temp fix in place. |
@zwilias Okay so I made Elm.tmLanguage during this interim while figuring out what to do. It's pointing again to that old commit: https://github.com/elm-community/Elm.tmLanguage. Can you ask them to do a fresh pull from there? |
github-linguist/linguist#4006 created. Thanks @eeue56! |
👋 I came across this issue, because I was trying to implement a small fix for GitHub syntax highlighting. I'm wondering if anyone in this conversation could clarify which repo we intend to be the source of truth for GitHub highlighting. It seems that GitHub will not support the new Sublime syntax, so keeping I'm willing to do the work, so just let me know what you all are thinking. |
We’ll be maintaining |
Alternatively, @eeue56 if you think it makes more sense to maintain Elm.tmLanguage as a separate project, can we find it a maintainer? |
Kevin, that sounds solid to me. I didn't realize that's you were
maintaining ST2 support here. Unless we hear otherwise from others I can
look into updating linguist in the next week or two.
**EDIT: I haven't gotten around to this, though I still think it's the proper approach. Hopefully someone else can find time to implement it.**
|
Interestingly, GitHub uses this very repo as the provider for syntax highlighting on GitHub. https://github.com/github/linguist/blob/v6.0.0/.gitmodules#L679-L681
In the latest update of linguist, they updated all the submodules. The Elm module went from 581b9e6 to 6f2e536 which is a fairly big change.
It would be pretty great if we could figure out a way forward - whether that means making this repo compatible with linguist or something else, I'll leave in the middle as I have no real idea how this bundle actually works.
The text was updated successfully, but these errors were encountered: