stack-ide-sublime icon indicating copy to clipboard operation
stack-ide-sublime copied to clipboard

UnicodeSyntax does not get highlighted

Open kerscher opened this issue 10 years ago • 4 comments

When using the UnicodeSyntax language pragma, one should be able to substitute some ASCII sequences for Unicode characters as shown here and on the following table:

ASCII Unicode alternative Code point Name
:: :: 0x2237 PROPORTION
=> 0x21D2 RIGHTWARDS DOUBLE ARROW
forall 0x2200 FOR ALL
-> 0x2192 RIGHTWARDS ARROW
<- 0x2190 LEFTWARDS ARROW
-< 0x2919 LEFTWARDS ARROW-TAIL
>- 0x291A RIGHTWARDS ARROW-TAIL
-<< 0x291B LEFTWARDS DOUBLE ARROW-TAIL
>>- 0x291C RIGHTWARDS DOUBLE ARROW-TAIL
* 0x2605 BLACK STAR

However, it appears that the built-in syntax highlighter is unaware of this: unicodesyntax

(Note that stack-ide works regardless — although not shown here the types are correct on the status bar)

Maybe it would be a good idea to override the default and use a new syntax highlighter, such as the one used by SublimeHaskell but augmented with this?

kerscher avatar Nov 03 '15 16:11 kerscher

I've sent a PR to solve this partially in the default Haskell package: https://github.com/sublimehq/Packages/pull/110

Is there interest in further work on this?

kerscher avatar Nov 05 '15 00:11 kerscher

Sweet, thanks Yghor — yeah, it would be wonderful to get all the improvements from SublimeHaskell merged into the default Haskell package for everyone's benefit. I can't enumerate them all off the top of my head but I know there are plenty of little bugs in the highlighting : )

lukexi avatar Nov 05 '15 08:11 lukexi

(and I'm certainly down to adopt the SublimeHaskell tmLanguage file here in the meantime)

lukexi avatar Nov 05 '15 08:11 lukexi

Cool. It's ported with some additional niceties. :)

kerscher avatar Nov 15 '15 21:11 kerscher