Closed qerub closed 10 years ago
I'm afraid this is not a very good issue report. Can you please post specific details? Screenshots of issues when highlighting would be ideal. Thanks!
Sure. Here are three examples:
42
shouldn't be red.foo->bar
should be lexed as a single token.EXPLODE-VERY-LOUDLY!
should also be lexed as a single token.@technomancy: Have you got some more examples?
(I was feeling grumpy when I filed the issue and the problems seemed "obvious" in the moment. Sorry.)
Here's another one found in the wild:
While the new color choices are questionable, it's mostly the hideous red background that makes me cringe.
https://github.com/ztellman/cambrian-collections/blob/master/project.clj#L13-L15
Racket is affected by this too; arguably even worse, since square brackets may be used interchangably with regular parens:
https://github.com/technomancy/atreus/blob/master/atreus.rkt#L223-226
Thanks for the feedback, guys. I definitely agree that TextMate's Clojure grammar (i.e. the one recommended in the official Clojure documentation) is lacking compared to the old syntax highlighting.
I've spent my morning iterating on the grammar on a fork (https://github.com/vmg/textmate-clojure/compare/vmg/fixes?expand=1) and will continue do it as reports keep coming in. I'll try to deploy this later today or tomorrow so you can see the progress. I believe I have fixed all the issues reported in this thread, but will keep digging in.
Again, the TextMate grammar is open-source and Pull Requests are very appreciated. The more the grammar improves, the better Clojure support we'll have for GitHub, and for TextMate, and for Sublime Text, and for Atom, and the open-source community will be richer and candy will literally rain from the skies and so on.
Thanks again, and please bear with us while we polish this new syntax highlighting.
as a data point, in the 2014 state of clojure survey, 4.03% of responders chose "Other" as their editor/ide while 3.96% chose "Sublime Text" https://cognitect.wufoo.com/reports/state-of-clojure-2014-results/
(it shouldn't be surprising that the textmate grammar isn't good)
The examples that @technomancy pointed out are fixed now. Please feel free to open new issues if you discover more problems.
The issues I had observed are gone now as well. Thanks! :+1:
It has gotten really bad after https://github.com/github/linguist/pull/1707.