Interface Highlighter

All Known Implementing Classes:
DefaultHighlighter

public interface Highlighter
The Highlighter interface provides syntax highlighting functionality for the LineReader.

Highlighters are responsible for applying visual styling to the command line text as the user types. This can include syntax highlighting for programming languages, highlighting matching brackets, marking errors, or any other visual cues that help users understand the structure and validity of their input.

Implementations convert plain text into AttributedString instances that contain both the text and its visual styling information. The LineReader will then render these styled strings to the terminal with the appropriate colors and text attributes.

The default implementation is DefaultHighlighter.

See Also: