haskell / haskell/vscode-haskell-syntax-highlighting
Highlighting for haddocks
- Dominant language
- Haskell
- Stars
- 109
- Forks
- 51
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 2
Description
As per the [haddock documentation](https://haskell-haddock.readthedocs.io/en/latest/markup.html), Haskell code can appear in Haddock comments in the following ways:
```haskell
-- code blocks:
-- @
-- f :: a -> a
-- f a = a
-- @
--
-- bird tracks:
-- > f 12
--
-- REPL examples:
-- >>> f 12
```
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:
- headings with `=` `==` `===`, ...
- named chunks `$chunkname`
- `*bold*` and `/italics/`
- `@since` annotations
- URLs (VS Code automatically makes URLs clickable)
I think we could have a special haddock grammar file that we could include in the main Haskell grammar for Haddock comments.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.