Mosaic_ui.Line_numberLine-number gutter with per-line colours, signs, and custom numbering.
Line number gutter for code display.
A composite container that pairs a line number gutter with a content area. Children are routed to the content area via Renderable.child_target. On render, the gutter discovers the first child with a Line information provider and draws line numbers accordingly.
The gutter renders line numbers, optional signs, and per-line background colors. Content area colors are applied via a render_before callback on the content node. Setting show_line_numbers to false hides the gutter entirely; it then takes no layout space.
type line_sign = {before : string option;after : string option;before_color : Ansi.Color.t option;after_color : Ansi.Color.t option;}The type for gutter signs rendered before and after the line number. Before signs are right-aligned within their column for visual consistency.
module Props : sig ... endval create :
parent:Renderable.t ->
?index:int ->
?id:string ->
?style:Toffee.Style.t ->
?visible:bool ->
?z_index:int ->
?opacity:float ->
?fg:Ansi.Color.t ->
?bg:Ansi.Color.t ->
?min_width:int ->
?padding_right:int ->
?show_line_numbers:bool ->
?line_number_offset:int ->
?line_colors:(int * line_color) list ->
?line_signs:(int * line_sign) list ->
?line_numbers:(int * int) list ->
?hidden_line_numbers:int list ->
unit ->
tcreate ~parent () is a line number gutter container attached to parent. Optional parameters have the same defaults as Props.make.
val node : t -> Renderable.tnode t is t's underlying renderable.