Versions in this module Expand all Collapse all v0 v0.0.2 Jan 2, 2026 Changes in this version + func NewContextBuilder(opts ...Option) *contextBuilder + func NewSourceTree(ctx context.Context, r io.Reader, filename string) (*sourceTree, error) + type Formatter interface + Format func(lines []line, linesToShow Set[lineNumber], linesToHighlight Set[lineNumber]) string + type Option func(*contextBuilder) + func WithChildLines(lines lineNumber) Option + func WithCloseScopeGaps(enabled bool) Option + func WithExpandChildScopes(enabled bool) Option + func WithGapToClose(gap lineNumber) Option + func WithParentContext(enabled bool) Option + func WithSurroundingLines(lines lineNumber) Option + type Set map[T]struct + func NewSetFromSlice[T comparable](s []T) Set[T] + func NewSet[T comparable]() Set[T] + func (s *Set[T]) Clear() + func (s Set[T]) Add(v T) + func (s Set[T]) Has(v T) bool + func (s Set[T]) Remove(v T) + func (s Set[T]) ToSlice() []T + type TextFormatter struct + func NewTextFormatter(opts ...TextFormatterOption) *TextFormatter + func (tf *TextFormatter) Format(lines []line, linesToShow Set[lineNumber], linesToHighlight Set[lineNumber]) string + type TextFormatterOption func(*TextFormatter) + func WithColors(enabled bool) TextFormatterOption + func WithContextSymbol(symbol string) TextFormatterOption + func WithGapSymbol(symbol string) TextFormatterOption + func WithHighlightSymbol(symbol string) TextFormatterOption + func WithLineNumbers(lineNumbers bool) TextFormatterOption + func WithSpacer(spacer string) TextFormatterOption v0.0.1 Dec 10, 2025