Semantic Highlighting & Pretty Printing¶
v0.9.18 Idris comes with support for semantic highlighting.
When using the
REPL or IDE support, Idris will highlight your code accordingly to its meaning within the Idris structure. A precursor to semantic highlighting support is the pretty printing of definitions to console, LaTeX, or HTML.
The default styling scheme used was inspired by Conor McBride’s own set of stylings, informally known as Conor Colours.
The concepts and their default stylings are as follows:
|Implicit||Italic Purple||Italic Magenta|
Idris also supports the pretty printing of code to HTML and LaTeX using the commands:
:pp <latex|html> <width> <function name>
:pprint <latex|html> <width> <function name>
If you are not happy with the colours used, the VIM and Emacs editor support allows for customisation of the colours. When pretty printing Idris code as LaTeX and HTML, commands and a CSS style are provided. The colours used by the REPL can be customised through the initialisation script.
Please also see the Idris Extras project for links to editor support, and pre-made style files for LaTeX and HTML.