Versions in this module Expand all Collapse all v0 v0.11.0 Aug 11, 2026 v0.10.0 Aug 11, 2026 v0.9.0 Aug 11, 2026 v0.8.0 Aug 11, 2026 v0.7.0 Aug 11, 2026 v0.6.0 Aug 11, 2026 v0.5.1 Aug 10, 2026 Changes in this version + type Doc struct + Files Files + func New(files Files) *Doc + func NewDoc(raw string) *Doc + func (d *Doc) AllFolded() bool + func (d *Doc) Current() (Row, bool) + func (d *Doc) CurrentFile() (File, int, bool) + func (d *Doc) Cursor() int + func (d *Doc) CursorToFile(file int) + func (d *Doc) CycleMode() Mode + func (d *Doc) DropSelection() + func (d *Doc) ExtendSubLine(delta int) + func (d *Doc) InSelection(row int) bool + func (d *Doc) Len() int + func (d *Doc) Mode() Mode + func (d *Doc) Move(delta, height int) + func (d *Doc) MoveFile(delta, height int) + func (d *Doc) MoveTo(row, height int) + func (d *Doc) Progress() (read, total int) + func (d *Doc) Row(i int) (Row, bool) + func (d *Doc) Rows() []Row + func (d *Doc) Scroll(delta, height int) + func (d *Doc) ScrollIntoView(height int) + func (d *Doc) SelectHunk() + func (d *Doc) SelectedLines() []Line + func (d *Doc) SelectedText() string + func (d *Doc) Selecting() bool + func (d *Doc) Selection() Selection + func (d *Doc) SetAllFolded(collapsed bool) + func (d *Doc) SetFold(file int, collapsed bool) + func (d *Doc) SetNotes(notes map[NoteKey][]string) + func (d *Doc) Snippet() string + func (d *Doc) State(file int) (collapsed, read bool) + func (d *Doc) SubLineRange(row int) (start, end int, ok bool) + func (d *Doc) ToggleFold() + func (d *Doc) ToggleRead(height int) + func (d *Doc) ToggleSelect() + func (d *Doc) Top() int + type File struct + Added int + Binary bool + Hunks []Hunk + Mode string + NewPath string + OldPath string + Removed int + func (f File) Path() string + func (f File) Renamed() bool + type Files []File + func Parse(raw string) Files + func (fs Files) Stat() (added, removed int) + type Highlighter struct + func NewHighlighter(path string) *Highlighter + func (h *Highlighter) Enabled() bool + func (h *Highlighter) Tokens(line string) []Token + type Hunk struct + Lines []Line + NewCount int + NewStart int + OldCount int + OldStart int + Section string + func (h Hunk) Header() string + type Kind int + const Added + const Context + const Equal + const Removed + type Line struct + Kind Kind + New int + NoNewline bool + Old int + Segments []Segment + Text string + func (l Line) Marker() string + func (l Line) Number() int + func (l Line) Words() []Segment + type Mode int + const Chars + const Lines + const Words + func (m Mode) String() string + type NoteKey struct + File int + New int + Old int + func KeyOf(file int, l Line) NoteKey + type Row struct + File int + Hunk int + Kind RowKind + Line Line + Note string + func (r Row) Selectable() bool + type RowKind int + const BlankRow + const ContentRow + const FileRow + const HunkRow + const NoteRow + type Segment struct + Kind Kind + Start int + Text string + func (s Segment) End() int + type Selection struct + Active bool + End int + From int + Mode Mode + Start int + To int + type Token struct + Start int + Text string + Type chroma.TokenType v0.5.0 Aug 8, 2026 v0.4.1 Aug 8, 2026 v0.4.0 Aug 8, 2026