Open sheaf opened 4 years ago
Some improvements to Haddock support in a0b8ea7, detecting more Haddock comment blocks than before (such as those starting with -- ^
).
Dude having full on haddock highlighting would be so nice! I don't think any of the other extensions do haddock?
Haddock also have lists, maybe we can "borrow" part of the matching rules from markdown?
I'd almost recommend we start a new syntax file for haddock and include it from the Haskell one. What do you think?
Yes a separate haddock grammar file is what I had in mind too. Do you think you could start one?
Sure. I'll try to do that. I don't know when yet though.
We should also include the Haddock grammar to highlight the description
field in .cabal
files.
As you may have seen I started the grammar. However I decided to publish a release for the many fixes separately first, because I expect this will take a bit more time with bug fixing the grammar (particularly code embedding) and then writing tests etc.
As per the haddock documentation, Haskell code can appear in Haddock comments in the following ways:
There are also delimiters for LaTeX:
\( ... \)
(inline equation) and\[ ... \]
(displayed equation).It would be nice if highlighting could be enabled for those cases.
Some other extra highlighting that could be done:
=
==
===
, ...$chunkname
*bold*
and/italics/
@since
annotationsI think we could have a special haddock grammar file that we could include in the main Haskell grammar for Haddock comments.