syntax

command
v0.8.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Command syntax shows fenced code under different chroma stylesheets, switched while the program runs.

The point is the switch, not the colors. A chroma stylesheet is baked into the renderer when markdown.New builds it, so changing it means building a new render function — and, because tuikit.StreamingMarkdown caches rendered output keyed on source and width alone, a new streamer too. Keep the old one and settled blocks stay in the previous palette forever, since their source never changes again.

go run ./examples/syntax

Press tab to cycle stylesheets, or pick one with -syntax. The full set markdown.SyntaxThemes returns is what a host would offer in a picker.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL