active_renderer

Contents

active_renderer#

penzai.treescope.default_renderer.active_renderer: ContextualValue[TreescopeRenderer]#

The default renderer to use when rendering a tree to HTML.

This determines the set of handlers and postprocessors to use when rendering an object.

This can be overridden locally to reconfigure how nodes are rendered with treescope. Users are free to set this to an arbitrary renderer of their choice, and programs should not assume the renderer has a particular form. Library functions can retrieve the current value of this to render objects in a user-configurable way, and can optionally make further adjustments using TreescopeRenderer.extend_with.