-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Better syntax highlighting for Dart #1959
Better syntax highlighting for Dart #1959
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Maybe you want to update the changelog so other users will know about the change? You can check the contribution guide for details :)
What license is the new syntax under? It starts off as MIT but contains GPL license text afterwards: https://github.com/elMuso/Dartlight/blob/master/LICENSE |
For now, I opened an issue asking on the other repository what the license is. Sadly this is the only other package on Sublime Text providing Dart syntax highlighting support, so it was the only alternative to the broken and unmaintained one. |
Honestly, even if the new syntax is better, neither project seem very active nor up to date. The last release for the old one was 6 years ago, and the new one was 2 years ago. However, those two packages are the only one on sublime text providing syntax highlighting for Dart. Is sublime text packages the only possible source for syntaxes for bat ? I suppose VSCode syntaxes are not supported even though they use the same highlighting engine ? |
VS Code isn't using the same highlighting engine. But if you can convert a VSCode syntax definition to a PList/XML |
Interesting - I didn't know that. To what extent is this possible? Is every VS Code syntax feature represented on the tmLanguage/sublime-syntax side? I.e. is this mapping complete (even if it's not reversible)? Is this something we should look into? |
https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide It seems it may be necessary to convert from a JSON TextMate grammar to a PList, presumably they are interchangeable. Then it mainly depends on whether any new features were added to TextMate and whether Sublime's converter would need to be augmented to handle them. |
It is now fixed. The author of the repo put back the proper MIT license. elMuso/Dartlight#6 |
@Ersikan Can you resolve the conflict please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conflict was trivial, so I took care of it.
Thank you for your contribution!
Closes #1958
This PR changes the dart highlighting source package to elMuso/Dartlight.
This fixes the bug mentioned in the issue. I added a syntax test to check that comments in function calls are highlighted correctly.
However, the highlighting changes quite a bit. The two screenshots below show the difference :
Old:
New: