2 releases

0.1.1 Apr 7, 2024
0.1.0 Feb 20, 2024

#1069 in Text processing

Download history 3/week @ 2024-07-22 21/week @ 2024-07-29 19/week @ 2024-08-05 2/week @ 2024-08-19 28/week @ 2024-08-26 15/week @ 2024-09-02 7/week @ 2024-09-09 14/week @ 2024-09-16 34/week @ 2024-09-23 21/week @ 2024-09-30 41/week @ 2024-10-07 7/week @ 2024-10-14 10/week @ 2024-10-21 4/week @ 2024-10-28 28/week @ 2024-11-04

53 downloads per month

MIT license

67KB
2.5K SLoC

hi-doc

Diagnostic formatting library.

Motivation

Most diagnostic formatting libraries implement both formatting and span/source management simultaneously. This can be beneficial for consistency, but it requires tying the code of your library to a third-party annotation library, which can be inconvenient, especially when your library already has its own logic for diagnostics.

hi-doc solely implements diagnostic formatting, allowing for seamless integration with existing diagnostic logic within a library.

Finished features

  • Multiple ranges per annotation

  • Multi-line annotations

  • Multi-line annotation text

  • Support for unicode fullwidth characters

  • Correct handling of non-printable control characters, and configurable tab width

  • Formatting of the annotation text itself

  • Syntax highlightning in annotated text

  • Support for non-colored terminals

  • Place annotations on top of the line

Dependencies

~450–600KB
~11K SLoC