ANSI terminal formatter for Makeup syntax highlighting tokens.
Maps Makeup {type, metadata, text} token types to ANSI escape sequences
using a dark terminal color scheme.
Summary
Functions
Converts Makeup tokens to [{text, style}] pairs.
Tokenizes and formats source code with ANSI colors.
Returns a single ANSI-colored string for the given source and language.
Types
Functions
@spec format_tokens([{atom(), keyword(), String.t() | [any()]}]) :: [styled_segment()]
Converts Makeup tokens to [{text, style}] pairs.
@spec highlight(String.t(), atom()) :: [styled_segment()]
Tokenizes and formats source code with ANSI colors.
Returns a list of {text, ansi_style} tuples. If Makeup or the requested
lexer is unavailable, returns the source as-is with an empty style.
Returns a single ANSI-colored string for the given source and language.