micro icon indicating copy to clipboard operation
micro copied to clipboard

Improve Haskell syntax highlighting

Open Andriamanitra opened this issue 7 months ago • 1 comments

Various improvements and fixes to the Haskell syntax:

  • Better highlighting of operators (including user-defined ones)
  • Highlight SomeType and T.SomeType as type but T.someFunction using default color. Capitalized identifiers in Haskell can be module names, type classes, types, or type/data constructors. Micro's syntax highlighting is not powerful enough to properly distinguish between these but I found using type for all of them a reasonable compromise.
  • Add highlighting for unit instance (()) and numeric literals (int/float/octal/hexadecimal)
  • Improve highlighting for escape sequences in strings
  • Remove as from the list of keywords because it only works like a keyword in the context of import ... as ..., and it is very commonly used as an identifier
  • Add highlighting for infix function application (eg. 5 `div` 3)
  • Add highlighting for SemiGroup / Applicative / Monoid type classes

screenshot showing the difference to current syntax highlighting

Andriamanitra avatar Jul 07 '24 05:07 Andriamanitra